Closed LucasSantosSilva closed 6 years ago
Hi, I do not quite know how we can help you. This page is for supporting the single channel gateway but you have a question regarding an ESP32 sensor node. Do you use the single channel gateway or another gateway? If the single channel gateway is used, it is possible to see the messages received and even decode them (#define _LOCALSERVER 1). But if you are not using a single channel gateway you better ask on the TTN forum for ESP32 nodes.
Yes, I using the single channel getaway in my WiFi LoRa 32, I will try on this part #LOCALSERVER1
if here is not this local appropriate I apologize
see ESP-sc-gway.h and fill in your sensor in sensor.h
I solved the problem, it was not a code, but a TTN configuration. Thanks =)
The connection information even arrives at the TTN, but does not show the data. I am using the same code obtained here. What may be the problem?
I don't know if this part send the data, I tried with values fixed too.
` void do_send(osjob_t* j) { // Check if there is not a current TX/RX job running if (LMIC.opmode & OP_TXRXPEND) { Serial.printf("OP_TXRXPEND, not sending\r\n"); } else if (!(LMIC.opmode & OP_TXRXPEND)) { TempAndHumidity newValues = dht.getTempAndHumidity(); lpp.reset(); newValues.temperature = 11; newValues.humidity = 40; lpp.addTemperature(1, newValues.temperature); lpp.addRelativeHumidity(2, newValues.humidity); Serial.printf("Temperature : %.2f, Humidity : %.2f\r\n", newValues.temperature, newValues.humidity); display.clear(); display.drawString(0, 0, "Temperature: "); display.drawString(90, 0, String(newValues.temperature)); display.drawString(0, 20, "Humidity : "); display.drawString(90,20, String(newValues.humidity)); display.display();
if 0
endif
} } `