1
0
Fork 0
Commit graph

15 commits

Author SHA1 Message Date
cb41178d87 Build: Introduce prod/dev environments
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.
2023-12-17 21:18:58 +00:00
006fb424f7 IDs: Mystery lifted, Loup-Garou !
Update the promo names array with the newest year name.
2023-11-10 17:50:13 +00:00
ecfa4e3f79 Speaker: Introduce audio playback
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.
2023-10-22 21:19:29 +01:00
147e51c125 Com: Make the comment length explicit
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.
2023-10-22 21:16:49 +01:00
4fa109f816 LCD: Introduce LCD display and animations
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.
2023-10-21 22:01:10 +01:00
864f53bbf7 Utils: Introduce utils and animation helpers
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.
2023-10-21 21:59:54 +01:00
aa90c8be68 IDs: Introduce ID handling functions and data
IDs will be needed by multiple subsystems, so introduce the needed
variables and handling functions.
2023-10-21 18:23:43 +01:00
5a907aa9ad RFID: Update comment refering to -ID
When a tag leaves, we don't negate the ID which would be
implied by writing -ID.
Clarify that we set the sign bit instead.
2023-10-16 22:16:47 +01:00
f4c6fcb905 Com: Implement proper communications
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.
2023-09-24 18:04:27 +01:00
a2a752a720 RFID: Fix tag return when gone
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.
2023-09-24 12:31:01 +01:00
a566806c21 README: Add status
Add status of the project goals in the README and update them
with regards to the newly added RFID.
2023-09-10 20:29:06 +01:00
5ca978c63b RFID: functional tag reading
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.
2023-09-10 20:28:27 +01:00
4c1bee73e5 Main structure and setup
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.
2023-09-09 19:46:10 +01:00
22ee9ddee1 Add pinout
Pinout was autogenerated from KiCad and adapted for readability
2023-09-09 18:19:57 +01:00
3c0027b75a Init project
Add LICENSE and README
Basic platformio project structure with required libs
2023-09-09 18:01:24 +01:00