Algaeman

@algaeman
5 Followers
30 Following
308 Posts
@AkaSci @rayckeith 49 days is a millisecond (unsigned) overflow
@cstross rAmen
@Olly42 I'd prefer something with fully open source code for my phone
@DJGummikuh https://github.com/espressif/arduino-esp32/blob/master/libraries/USB/examples/USBMSC/USBMSC.ino. But, I think you are better off using fatfs, and put the raw functions (https://github.com/espressif/arduino-esp32/blob/master/libraries/SD_MMC/src/SD_MMC.cpp#L420-L425) into FFat.cpp. You need to be able to access it from both sides. Note that there are very messy race conditions in there, so you will have to carefully mutex the access, or else let it sit for a while after changes before reading.
arduino-esp32/libraries/USB/examples/USBMSC/USBMSC.ino at master · espressif/arduino-esp32

Arduino core for the ESP32. Contribute to espressif/arduino-esp32 development by creating an account on GitHub.

GitHub
@DJGummikuh This won't be so easy on flash, b/c Arduino doesn't expose the raw diskio for fatfs, but if you start from https://github.com/espressif/arduino-esp32/blob/master/libraries/SD_MMC/examples/SD2USBMSC/SD2USBMSC.ino, you can put a polling in the loop to check for changes to /config.ini, and take some action based on that.
arduino-esp32/libraries/SD_MMC/examples/SD2USBMSC/SD2USBMSC.ino at master · espressif/arduino-esp32

Arduino core for the ESP32. Contribute to espressif/arduino-esp32 development by creating an account on GitHub.

GitHub
@DJGummikuh Not sure I get exactly what you are trying to do, but wokwi.com provides an emulator so you can build a fake system on your PC, including an SD card (note that it doesn't give you persistent flash, but that is available (4, 8 or 16MB) on every esp32 as well).
@Veza85UE If it is possible for a Ukranian housewife to build an explosive drone in her kitchen, then politicians everywhere need to get very worried.
@graydon @moz @cstross Living in a fearful environment encourages conservative values. The more dangerous and chaotic the society becomes, the more people are willing to sign away their rights in the hope of safety. It takes conscious social effort to move toward liberal, equitable values
@arstechnica I heard that guy drinks pasteurized milk!
@gatelinker It's a good idea, but at this point you can get a basic STM32/ESP32 for the same price as a FT232H, and have an Arduino-based processor there that you can send signals to over USB.