thanks to your ESP32 course I was able to arrange a code that connects to WiFi, uses NTP, writes to a SD card the temperature and humidity data, goes to sleep for a fixed time, then ESP32 wakes up, collects data with timestamp and goes again to sleep. When I tried to add a 0.96″ 1306SSD display and to have it working when the ESP32 is awake I got a Guru meditation error with ESP32 continuously rebooting. How can I solve this problem ? I’m a newbie and I’ve read that this type of mistakes happens if there is a null pointer or a stack overflow but I really don’t know what this means in my case. Thanks for your help
It’s very difficult to iunderstand what might be wrong without actually taking a look at the code.
Can you share a link to your code? Or share the snippet of code that uses the OLED.?
Thx for contacting me. I succeeded in getting the code working after several trials and errors. I’d forgotten to initialize the display and this caused a guru meditation error. Now it seems to work fine. Just one more question. I ‘d like to use the code sending the data from BME280 and SHT31 sensors to the SD card and using the NTP to get a timestamp. I would also be able to turn on and off the OLED DISPLAY by pressing a button to view the data even if the ESP32 is sleeping but I have no idea where I can get the info needed to get this result. Could you help me? Thx again in advance
If you want to turn on the OLED display when you press a button, the ESP32 will need to wake-up with the press of a button. This is called an external wake-up:
Then, you would need to check what caused the wake-up and proceed accordingly. If it was the external wake-up (the pushbutton), turn on the OLED. To detect what caused the wake.up, there is a function called esp_sleep_get_wakeup_cause(); that gets the wake.up reason. Check that function on that example to see how it works.
I hope this helps.
I’m really very satisfied of having subscribed your ESP32 courses. It helped me a lot ! Following your last advice I was able 1) to have an ESP32 collecting data from temp and hum sensors, store the data to a SD card with timestamp from NTP, go to deepsleep for a fixed amount of time and 2) to awake also with a pushbutton the ESP32 displayng the data on OLED..
This works fine when i’m connected to my wifi network but I’d like to be able to access to the data of my sensors from my cell phone or from a remote computer. I tried with Thingspeak and it works but I’d like to use MQTT as you show in one of your tutorials. The problem is that a Raspberry Pi as the one suggested in your tutorial is really impossible to buy at a reasonable price ( Pi4 are offered at more than 200$ !) so I asked you whether a clone like Orange Pi could work. You already told me it is supposed to work, but being a newbie I’m really afraid to find unexpected difficulties that I’m not able to solve while the support community for this Orange Pi seems to be fairly small.
Do you think that I could solve my problem with Blynk ? Which is your opinion ( and advice ) ?
I don’t have experience with Orange Pi. So, I’m not sure if you’ll encounter unnexpected outcomes. However, I’m almost sure that if you run Linux on it, you should be fine.
You can also use a cloud broker. Or create your own cloud broker: https://randomnerdtutorials.com/cloud-mqtt-mosquitto-broker-access-anywhere-digital-ocean/
I’m not familiar with blynk, so I can’t provide advice on this subject.
I hope this helps.