Added "if (WiFi.status() != WL_CONNECTED)..." Since the connection to ThingSpeak randomly disconnects after a few hours. Connection seems to be stable now.
ESP32_Biomodd.ino
This sketch runs on an ESP32 with an ADS1115 ADC sensor attached and is reading and relaying the voltage generated by a Winogradsky column.
Typical voltage range is between -300mV to +300mV but varies per column.
The ADS1115 has a programmable gain and currently set to (GAIN_ONE), resulting in a 0.125mV resolution with a maximum reading of +/- 4.096V. It is important not to exceed these voltage limits by VDD +0.3V.
The resulting value(s) can be pushed to Biomodd.xyz, a ThingSpeak channel or other services. This example pushes to both mentioned channels.
Example links:
Biomodd.xyz: https://www.biomodd.xyz/data?author=jeronimo
ThingSpeak: https://thingspeak.com/channels/1396903
Edit the following lines according to your own account/credentials:
For Biomodd.xyz http(s) push(check the latest required format there):
String serverPath = "https://biomodd.xyz/push?author=YOURNAME&device=DEVICE&sensor=SENSORNAME";
The sensorvalue is added in this line, with 0.125 (GAIN ONE) resolution:
serverPath += String(adc0 * 0.125);
For ThingSpeak:
String apiKey = "YOUR API KEY";
For IFTTT:
tba...
Make sure that the sketch does not push not too much data in a given amount of time, some servers will not accept a torrent of data.
Edit the following line to the amount of milliseconds between a push needed:
unsigned long timerDelay = 60000;