Skip to content

Latest commit

 

History

History
88 lines (64 loc) · 4.78 KB

arm.md

File metadata and controls

88 lines (64 loc) · 4.78 KB

Microcontroller & Sensors

All assembled, the total size is 9.5cm x 3.3cm x 2.8cm and weighs in at 50g.

Hardware

The following hardware is used:

Note: Adafruit is occasionally out of stock with their components. I have had good luck in the past finding them in stock at Mouser.

Wiring

Radio GPS IMU Igniter terminal
Pin 1 -> RX Pin 10 -> RX SDA -> SDA Left -> Pin 6
Pin 0 -> TX Pin 11 -> TX SCL -> SCL Center -> GND
3.3V -> Vin 3.3V -> Vin 3.3V -> Vin Right -> Pin 5
GND -> GND GND -> GND GND -> GND

Software

Dependencies

These instructions are for Linux (x86_64). See below for where to find instructions for other platforms. Do not ask for Windows support.

  • Download and extract the Adafruit SAMD library to ~/.arduino15/packages/adafruit/hardware/samd/1.0.9
  • Download and extract the ARM compiler to ~/.arduino15/packages/adafruit/tools/arm-none-eabi-gcc/4.8.3-2014q1
  • Download and extract Bossac to ~/.arduino15/packages/adafruit/tools/bossac/1.6.1-arduino.
  • Download and extract CMSIS to ~/.arduino15/packages/adafruit/tools/CMSIS/4.0.0-atmel.

Note: The archives above can be extracted whenever you'd like, but the paths at the top of the Makefile must be adjusted accordingly.

Alternatively, Adafruit has good instructions for getting the above set up with the help of the Arduino software. If not using Linux, this is most likely the easiest way to gather the dependencies.

For convenience, here's a list of commands to download each of the tarballs above and put them in the correct location:

mkdir -p ~/.arduino15/packages/adafruit/hardware/samd/1.0.9
mkdir -p ~/.arduino15/packages/adafruit/tools/arm-none-eabi-gcc/4.8.3-2014q1
mkdir -p ~/.arduino15/packages/adafruit/tools/bossac/1.6.1-arduino
mkdir -p ~/.arduino15/packages/adafruit/tools/CMSIS/4.0.0-atmel

curl --location https://github.com/adafruit/arduino-board-index/raw/gh-pages/boards/adafruit-samd-1.0.9.tar.bz2 | tar -xjf - --strip-components=1 --directory ~/.arduino15/packages/adafruit/hardware/samd/1.0.9
curl http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz | tar -xzf - --strip-components=1 --directory ~/.arduino15/packages/adafruit/tools/arm-none-eabi-gcc/4.8.3-2014q1
curl http://downloads.arduino.cc/bossac-1.6.1-arduino-x86_64-linux-gnu.tar.gz | tar -xzf - --strip-components=1 --directory ~/.arduino15/packages/adafruit/tools/bossac/1.6.1-arduino
curl http://downloads.arduino.cc/CMSIS-4.0.0.tar.bz2 | tar -xjf - --strip-components=1 --directory ~/.arduino15/packages/adafruit/tools/CMSIS/4.0.0-atmel

Compiling & Uploading

$ cd arm
$ make
$ make upload

Tests

$ cd arm
$ make test
$ make test_run # Don't re-compile, only run tests

Replaying flight from log

In some cases, it is useful to "replay" a flight from its associated log file. For example, when working on logic for apogee detection it is much easier and faster to replay the flight from an existing log file instead of doing actual test launches. To use this, simply place a log file at

arm/test/fixtures/replay.json

and then run the tests as normal. The output from the replayed flight will be printed to stdout in the usual log format.