Firmware - StormLib
What is StormLib?
To make it easier to send and receive the messages defined in the STORM 2027 Serial Specification, we created StormLib. StormLib also includes some abstractions of hardware (motors, encoders, etc.) taken from RobotLib. StormLib is subject to change once the 2027 rules release, and in future version afterwards.
Getting Started
- Install the Arduino IDE
- Install Earl's Arduino Pico library from Arduino IDE's Library Manager
- Install StormLib (TODO)
How to Add / Edit a Message
To add your own custom message, or edit/update an existing message, you will need to make changes in several locations. First, ensure your message is added/updated in the Serial Specification before writing any code. Then follow these steps:
- Add/update the message ID in the
Messageenum - Below that, add/update the typedef struct for the message. Example:
Note: if you message is a command (the computer telling a PCB to do something), then add the "Cmd" suffix to the name. If it's a response (the PCB telling the computer something it asked for), then add the "Rsp" suffix to the name. Otherwise, add the "Msg" suffix to the name.// ID 21 typedef struct DriveVelocityCmd { int16_t front_left_velocity; int16_t front_right_velocity; int16_t back_left_velocity; int16_t back_right_velocity; } DriveVelocityCmd;