candykingdom / firefly2

Small blinkenlight boards that sync up using radios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Firefly2

Programming

The fancy-node device can be programmed either using an STLink, or via USB port. To program via USB, you must first install [stm32loader] using pip (pip install stm32loader). You may also need to pass the port (typically /dev/ttyUSB0), e.g. pio run -e fancy-node-usb -t upload --upload-port /dev/ttyUSB0.

Saving device description in flash

Both node and fancy-node support reading the DeviceDescription from flash. The modes are defined by the DeviceMode enum within DeviceDescription.hpp. They work as follows:

  • CURRENT_FROM_HEADER: use the current device defined in Devices.hpp
  • READ_FROM_FLASH: read the device saved in flash, if present. If not present (determined by the validity of check_value), fall back to current.
  • WRITE_TO_FLASH: write current to flash, and then use it. This will only write the device to flash if it is different, to avoid causing flash wear.

About

Small blinkenlight boards that sync up using radios


Languages

Language:C++ 97.2%Language:CMake 2.3%Language:Shell 0.4%