Skip to main content

Firmware - StormLib

What is StormLib?

TODOTo 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

how

toInstall usethe arduino,Arduino downloadIDE earl'Install Earl's picoArduino library,Pico firmwarelibrary templatefrom /Arduino example,IDE's etc.Library

Manager

Install StormLib (TODO)

How to Add / Edit a Message

mostTo importantadd section,your own custom message, or edit/update an existing message, you will need to writemake thischanges 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 Message enum Below that, add/update the typedef struct for the message. Example:
     
    // 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;
    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.