this is the base code for the system. make a fork of this repo for your own code!
In essence this code is plug and play for the default SRP case. The only thing that has to be configured is when the pyro will fire, this can be changed in the config.json. By default, there is no code in the statemachine for servos as the use of them varies from rocket to rocket. There is however basecode for them in external.py
The boards already come with custom firmware preinstalled This custom firware contains custom pin definitions with useful and recognizable names. to see all compatible pins type the following:
>>> import board
>>> dir(board)
['__class__', '__name__', 'A0', 'A1', 'A2', 'ARM_MEAS', 'BUZZER', 'BW', 'CONT_MEAS', 'D0', 'D1', 'D11', 'D6', 'EXT_GPIO', 'I2C', 'LED', 'LED_EXT', 'MISO', 'MOSI', 'NEOPIXEL', 'PYRO_DETONATE', 'RX', 'SCK', 'SCL', 'SDA', 'SERVO', 'SPI', 'STEMMA_I2C', 'TX', 'UART', 'VBAT_MEAS', 'board_id']
If, for some reason, the firware is not flashed, do the following
- Remove all power from the board.
- Hold the BOOTSEL pin on the feather.
- Plug the USB into your computer.
- A drive should show up.
- Copy the .uf2 file in firmware/ to the drive.
- Once succesfully copied, the drive will auto-eject and startup again.
- Drag boot.py , code.py, config.json and lib/ to the drive.
- Reset the board by either removing the power and inserting it again, or simply presssing the reset button
- You are all set!
To have an interactive runtime with the board. Install the Mu editor More information can be found on The circuitpython website