Cant get data into thingspeak
Latest activity Reply by Mckenzie Gibson
on 29 Jun 2023
I have carefully followed the instructions to load data into my channel without success.
1 how do I check if I have a wifi connection?
2 the following lines are my thingspeak commands
char thingSpeakAddress[] = "api.thingspeak.com";
unsigned long myChannelNumber = 2202392;
const char * myWriteAPIKey = "xxxxxxxxxxxxxxxx";
String myStatus = "";
ThingSpeak.begin( client );
ThingSpeak.setField(1, volts2);
ThingSpeak.setField(2, adc2);
I can seed the data on arduino serial monitor. I am using an ESO8266 connected to a win 10 PC
Any help will be much appreciated as I have spent a lot of time trying to solve the problem
2 Comments
Time DescendingPlease consider the ThingSpeak library for Arduino and ESP. In the library code, there is a routine that will inform you that the wifi is connected via the serial monitor. Also, you can measure the wifi strength using most Arduino libraries. I'd look up how to measure RSSI.
For your code above, you are not writing the data to ThingSpeak. The setfield command sets the field to use for sending data to ThingSpeak, but does not actually send the data. Have a look at the library examples to see how to send the data. There is also this temperature write example in the ThingSpeak doc, but I think the library examples are cleaner.
Sign in to participate