cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.69k stars 397 forks source link

Redirect serial output to SD card #783

Closed drtorchwood closed 1 year ago

drtorchwood commented 3 years ago

Hi there,

I'm looking for a simple way to redirect the serial output to the SD card. Is there any option available? I haven't found anything regarding this topic in the manual. I don't mean the "normal" paxcounter data but the debug log.

Thanks!

cyberman54 commented 3 years ago

Yes, that would be an interesting option. But i don't have an example for this. Be careful with writes to SD card, this may trigger the watchdog if it's too slow, and you must ensure that access to the SD interface is mutexe'd, if shared bus lines are used.

cyberman54 commented 2 years ago

Example, how it can be done. Could be added to sdcard.cpp (writing) and cyclic.cpp (flushing).

cyberman54 commented 2 years ago

SD write is freshly prepared in code (sdcard.cpp), but for logging onto SD weed to wait until this bug is fixed in arduino-espressif32 framework.

cyberman54 commented 1 year ago

@drtorchwood the SD serial log redirection feature was implemented today.