So I purchased 5 boards from Banggood ,probably not a smart move but they were sold in a group of 5. Anyway when I compile a program using Arduino Ide 1.8.13 on a Windows10 pro and I open up the serial monitor I keep getting the:
wdt reset
load 0x4010f000 ,lens 3584, room 16
tail 0
check sum 0xbo
csum 0xbo
v2843a5ac
~ld
Start your code here
#include “DHT.h”
#include <ThingSpeak.h>
#include<WiFi.h>
#define DHTPIN 0
#define DHTTYPE DHT11
DHT dht(DHTPIN,DHTTYPE);
WiFiClient client;
int status =WL_IDLE_STATUS;
char ssid[]=”*********”;
char pass []=”*********”;
unsigned long myChannelNumber=*******;
const char * myWriteApiKey=”***********”;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
WiFi.begin(ssid,pass);
ThingSpeak.begin (client);
dht.begin();
}
void loop() {
// put your main code here, to run repeatedly:
delay(7000);
float h = dht.readHumidity();
float t = dht.readTemperature(true);
ThingSpeak.setField(1,t);
ThingSpeak.setField(2,h);
ThingSpeak.writeFields(myChannelNumber,myWriteApiKey);
Serial.print(“Temperature”);
Serial.print(t);
Serial.print(“Humidity”);
Serial.print(h);
delay(20000);
}
Things I have tried was to change baud rate, got garbage , load a different program check flash config works . I am sure other examples will work .I always reset so I am lost with this. any help would be appriciated.
Hi.
So, do you get that message over and over again or just once?
Did you try uploading the blinking LED sketch?
What happens when you upload that sketch?
I usually get my boards from Banggood and never had any problem with the hardware.
Regards,
Sara
So I got 5 boards , 1 of them had a different chip ESP8266 12E and the other 4 were 12F chips.I had 1 dead on arrival 12F board, can’t figure out how that got sent to me but that’s another story, not getting any help from banggood. To answer your question , Blink will work and yes I get the same message over and over. I have unplugged the cable and restarted it, I have reset the board multiable times , nothing seems to work. I created a sketch for a plant watering system that I was attempting to run with ThingsSpeak , wanted to make sure it was not my code having the issue so I found this sketch online as a tutorial to connect to thingspeak. Not sure what else to try. Thanks
Hi Larry.
I’m a bit confused. Does your board reboot constantly with the blinking LED sketch? Or just with the ThingSpeak sketch?
A constant reboot might mean that there is some problem or short-circuit in your circuit. Can you double-check that you have the sensor wired properly?
I see in your code that you have defined the data pin to GPIO 0 – that might be causing issues. Please, try using another GPIO.
To learn more about the ESP32 GPIOs, I advise that you take a quick look at this article: https://randomnerdtutorials.com/esp32-pinout-reference-gpios/.
Regards,
Sara
There is no constant reboot, and currently no devices connected to the WeMos .I was just trying to make sure I could connect before I wire up the device. This was just a test for me to see if I could correctly connect up to ThingaSpeak. I also tried a different sketch and it does not have that issue ,still haven’t got ThingSpeak working correctly yet but thats something I have to work on. Thanks for your help.
Hi again.
That is probably a problem in your code.
We have a simple example for ThingSpeak in this tutorial: https://randomnerdtutorials.com/esp32-http-post-ifttt-thingspeak-arduino/
I hope this helps.
Regards,
Sara
So I followed you suggestion and I ran into a couple of issues. Basically one issue was in the code const char had to be changed to char, also no matching function for call to HttpClient http
The code calls for “const* char” – a constant pointer to characters. HttpClient is built-in to the base ESP32 code. Did you install your board correctly?
Yes I sure, I have used this board configuration before and it all worked. I go to tools and search for it , Board:”WeMos D1R1” is selected . What more should I have to do?
Once again I tried to use that code and const char* had to be changed to char*, still getting the HTTPClient error no matter how I write it eg HTTPClient.h or HttpClient.h . Actuall went in and downgraded my esp8266 in tools from 2.72 to 2.42 , still no luck. I probably should just give up at this point, weeks and still no further ahead.
Ohhhhhhhh…..You’re using an ESP8266. Yeah, that tutorial won’t work without modification. You’ll need to mashup that tutorial with the one for 8266 which uses:
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h>
Actually some one posted the answer, the Doiting board is a esp8266 and not a eas32, so it won’t work with that code.
We have these two tutorials for the ESP8266:
- https://randomnerdtutorials.com/esp8266-nodemcu-http-post-ifttt-thingspeak-arduino/
- https://randomnerdtutorials.com/esp8266-nodemcu-http-get-open-weather-map-thingspeak-arduino/
Regards,
Sara