Platformio supports multiple environments and sharing a global configuration.
Make use of this to easily allow switching between the production build, with HID,
and the development build, with serial.
Update the README with information on how to build those environments.
Introduce the Speaker class to play audio from the SD card when detecting
tags.
The only audio supported is WAV.
Audio playback is handled via interrupts, so it might try to read from the
SD card at the same time as the LCD class is trying to read new frames.
Update the LCD animation code to temporarily disable audio interrupts while
reading from the SD card.
sendComment cannot send more than 62 bytes, as limited by the HID report.
Sending more is prevented by vsnprintf, but change the function signature
to make it explicit that the array passed to it should be at most 62 bytes.
Add support for the LCD and using it for displaying animations.
Animations are automatically played if available for the ID of the
detected tag.
The code should support adding other kind of animations, for tags being
removed or for other UI interactions for example.
The next commit implements the LCD and animation support. To enable an easy
way to create animations for it, add details in the README regarding the way
the SD card is used and how the files need to be formatted.
Create the Utils directory and add a Rust project to do the bit flipping and
a script that automates all the steps described in the README.
Add a README for Utils explaining how to use them.
Implement a set of functions to create messages following the protocols
defined in the README for communication.
Handle HID, which is used to communicate with the interactive application.
Update README with details on the message structures.
Previously, the return value when a tag was gone was the negative ID.
However, this isn't the most effective to process later as a negative
number uses two's complement, changing all lower bits in addition
to the sign bit.
Change this to just set the sign bit instead. This still produces
a negative number, which is what we want to check to konw if the tag
is new or went away, but maintains the lower bits so the ID can be
retrieved with a simple bit-wise and.
Add a new class to handle the RFID module and associated data
in order to track active tags.
Update main with RFID initialization and a minimal usage to
check it is working as expected.
pinMode most of what could be useful in the main and put modules
LOW to minimize power draw before the regulator is ON.
Add the skeleton for the setup, main loop and battery level checking.