Search found 5 matches
- Fri Nov 26, 2021 9:36 am
- Forum: ESP32 boards
- Topic: file.flush() causes a crash
- Replies: 0
- Views: 1690
file.flush() causes a crash
Hi. I'm working on a weather station project and it uses the ESP32's RTC memory. I added a function ( rtcmem.saveSession() ) that dumps the content of the RTC memory (as a string) and writes it to a file when the node is about to go to deep sleep. Then, upon startup, if a crash was detected, I can u...
- Thu Nov 25, 2021 10:36 pm
- Forum: Development of MicroPython
- Topic: Interacting with files
- Replies: 2
- Views: 11162
Interacting with files
I'm trying to add a function to the uos module which should create an empty file on my ESP32. Something like this: STATIC mp_obj_t test() { mp_int_t ret_val; printf("attempting to create file \"test.txt\"\n"); FILE* file; file = fopen("test.txt", "w"); if(file == NULL){ printf("file pointer is null\...
- Sat Apr 03, 2021 6:01 pm
- Forum: ESP32 boards
- Topic: Unable to perform a soft reset
- Replies: 1
- Views: 1672
Unable to perform a soft reset
Hi. I'm trying out my ESP32 board and I noticed that the soft_reset function (in the machine module) does not work. I have a boot.py file that looks like this: import machine print("Hello World!") machine.soft_reset() My ESP32 does not want to soft reboot. Basically, nothing happens. The "Hello Worl...
- Tue Feb 02, 2021 8:05 am
- Forum: ESP32 boards
- Topic: Filesystem corruption
- Replies: 2
- Views: 1788
Re: Filesystem corruption
Thank you! Yes, there is a debug feature in my code that logs error messages into a file. However, the file is closed before the deep sleep starts. I decided to add an extra line that unmounts the filesystem before deep sleep. def goToSleep(reason="OK"): global netman, PowerManagement, rtc, runtime_...
- Sat Jan 30, 2021 2:26 pm
- Forum: ESP32 boards
- Topic: Filesystem corruption
- Replies: 2
- Views: 1788
Filesystem corruption
Hi. I'm working on a school project - a weather station. I started writing the code in Arduino IDE however I decided to switch to MicroPython since I like Python a lot more than C++ and it allows me to implement some more complicated features easier. I finished writing the code for the project (it s...