Badger File Organisation

Hallo,
I have a (bit more than) beginners knowledge of Python and have built a number of Raspberry Pi and simple Pico projects.

I am now playing with Pimoroni’s Badger. Basic working is fine and I have added new images etc, but I have some problems when I want to go further.

I have read all I could find on Badger, but I am missing the following:

  • Is there somewhere a description of the file structure and the functions of the various files?
  • What do the .json files in the state directory do?
  • I can modify the application (.py) files, but where do the modified files go? I have uploaded them to the home directory on Badger, (is that correct?) but still have some problems.
  • Where is launcher stored on the device? If I modify launcher.py (e.g. to change the names of modified applications), what do I do with it?
  • If I boot the Badger by connecting to my computer and then select clock from the launcher, it starts at the default of 2022/2/28. If I run main.py from Thonny, the clock shows the current time.

I have a few more issues, but that is enough for now I think.
Perhaps I have missed something obvious, but any help would be appreciated.

If it doesn’t already exist, a more extended version of Getting Started with Badger covering these and similar issues would be very helpful.

I saw that too, I looked into it a while ago and it seems that the time gets passed by Thonny. The clock app isn’t useful if you just boot as the badger doesn’t include a battery backed RTC, there are quite a few options with a qwiic connector, e.g. Adafruit PCF8523 Real Time Clock (RTC) Breakout Board - STEMMA QT / Qwiic it’s not listed in the officially supported breakouts, but it’s cheaper and in stock compared to the RV3028 Real-Time Clock (RTC) Breakout

Hi @baralong,
I guess it’s pretty obvious that the Badger will only display the correct time when linked to an active RTC, but I was confused when it worked on USB. Equally obvious in retrospect that it took over the time from my PC via Thonny/USB. Thanks for pointing this out though.
I looked at the Adafruit RTC board, but this seems only to be for CircuitPython. Does this mean that the library would need to be converted for it to work with MicroPython?

I am gradually getting a clearer picture (by searching the web) of where to put my own files on the Badger and how to modify the scripts, but it would be nice if this information was collected in one place in Pimoroni’s documentation. Still it’s a useful learning process.