![]() Serial.println("Connection established!") While (WiFi.status() != WL_CONNECTED) // Wait for the Wi-Fi to connect ![]() WiFi.begin(ssid, password) // Connect to the network Unsigned long m圜hannelNumber = M圜hannel // ThingSpeak channel numberĬonst char * myWriteAPIKey = "MyKey" // ThingSpeak API write key WiFiClient client // Create a client that can connect to a specified internet IP address and port uint8_t t, h // Temperature and relative humidity variablesįloat t, h // Temperature and relative humidity variablesĬonst char* ssid = "MyNetwork" // The SSID (name) of the Wi-Fi network you want to connect toĬonst char* password = "MyPassword" // The password of the Wi-Fi network #define DHTTYPE DHT22 // Define the type of sensorĭHT dht(DHTPIN, DHTTYPE) // Create a DHT object #define DHTPIN D5 // Signal pin for the DHT22 sensor I am posting it again to make my point: // FULL CODE but with DHT22 DISCONNECTED I am starting to believe that this is causing the issue. The issue was that ThingSpeak was not receiving data for the O2 sensor once I have the following (original) full code with the DHT22 sensor NOT connected. The thing is that I can read the values of the sensor and visualise them on the serial monitor. In mV.įloat O2content = O2Vadj * 20.95 / 1.64 // Calibration with reference to standard condition (linear interpolation) ![]() We can use this in the characteristic curve provided with the sensor. In V.įloat O2Vadj = O2V / 344 * 1000 // I am getting rid of the OPAmp. Serial.begin(115200) // Start the Serial communication to send messages to the computerįloat O2V = (O2raw / 1024) // Adapt the output with a fraction of 0-1V input from NodeMCU Voltage. As requested, I made the code very short now, just reading the O2 sensor and send the data on the serial monitor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |