Repository navigation
v1.0.4 - Report Firmware Version, Tape Thickness Detection, Status LED Control
This is a feature release, mainly comprised of a few new features. It also includes some quality of life improvements, PlatformIO configuration file rework, flash size optimization, and a fix for a UART bootloader bug.
Report Firmware Version
This feature is implemented behind the "Vendor Options" command byte in the photon protocol. This command is meant to be used for different vendors of photon to use as they see fit. Previous unused for the LumenPnP feeders, this release marks the beginning of using it for some features.
The first byte in the 20 byte payload with a "Vendor Options" packet is a LumenPnP feeder-specific command byte. We've reserved the first 16 addresses (0x00 - 0x0F) for reporting back different pages of the firmware version. At 20 bytes per page, this is 320 total bytes. This has also been implemented in the LumenPnP debug tool (debug.opulo.io) and can be used to read a feeder's firmware version string using this feature.
When building firmware locally, PlatformIO will assign the firmware version to be "debug" by default. When built using the Workflow Dispatch feature in Github Actions, the firmware version will be "debug-GITHASH" where GITHASH is the short SHA commit hash that is being built. When built for a full release using Github Actions, the firmware version will be the release tag (eg v1.0.4).
Tape Thickness Detection
Photon now supports tape thickness detection. Upon first feed after loading tape, the feeder will quickly increase drive power while watching for the first movement via the encoder. This friction threshold is then used to determine the drive methodology for the tape (until the tape is unloaded or the feeder is reset, in which case the feeder then performs this test again). The first feed after driving tape or boot will now be preceded by this test (you'll notice a quick delay and might hear the motor increasing in power).
Enter Bootloader from Firmware
There is now a method of entering the UART bootloader from firmware. This was added to address a bug with floating RE and DE pins on the RS-485 transceiver, disabling UART firmware updates. Before entering the bootloader, this new mode biases the pins correctly to disable the transceiver, allowing UART firmware updates to operate.
To enter the bootloader from firmware, press and hold both buttons on the feeder until you see the status light flash red and blue for a second, then go off. After they stop flashing, you may stop pressing the buttons, and your feeder is in the UART bootloader. Given that this method is based on firmware, interrupting the programming process will remove this feature until the firmware is flashed correctly again.
Status LED Control
Also utilizing the "Vendor Options" packet, we've added the ability to control the LumenPnP Feeders' status LED. Using the first payload byte 0x10, the second payload byte sets the LED channels in the format: [N, N, N, N, set, red, green, blue]. This can also be tested using the LumenPnP debug tool (debug.opulo.io) by sending a Vendor Options Unicast packet with the payload 0x100B to turn the LED cyan, for example.
Other Tweaks
- The status LED will now turn red after a failed feed via the protocol, instead of just during a feed commanded via the buttons.
What's Changed
- Size optimization pass 1 by @daveismith in #4
- Update README.md by @sphawes in #5
- Reworked
platformio.inito support uploading with both the black magic probe and the FTDI UART adapter. by @theacodes in #6 - adds vendor option to report back firmware version by @sphawes in #7
- adds option to enter bootloader from firmware with pins strapped to disable RS-485 transceiver by @theacodes
New Contributors
- @daveismith made their first contribution in #4
- @theacodes made their first contribution in #6
Full Changelog: v1.0.3...v1.0.4