You can comment the httpRequestData variable above + "&location=" + sensorLocation + "&value1=" + String(bme.readTemperature()) String httpRequestData = "api_key=" + apiKeyValue + "&sensor=" + sensorName Http.addHeader("Content-Type", "application/x-www-form-urlencoded") Your Domain name with URL path or IP address with path Serial.println("Could not find a valid BME280 sensor, check wiring or change I2C address!") (you can also pass in a Wire library object like &Wire2) Serial.print("Connected to WiFi network with IP Address: ") If you change the apiKeyValue value, the PHP file /post-esp-data.php also needs to have the same key REPLACE with your Domain name and URL path or IP address with pathĬonst char* serverName = " // Keep this API Key value to be compatible with the PHP code provided in the project page. #ifdef ESP32Ĭonst char* ssid = "replace with your WiFi ssid" Ĭonst char* password = "replace with your WiFi password" Code for ESP8266 Nodemcu with BME 280 sensor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |