9 releases (breaking)

Uses new Rust 2021

0.9.0 Jan 11, 2022
0.8.0 Sep 27, 2021
0.7.0 Dec 31, 2020
0.6.0 Nov 28, 2020
0.3.0 Sep 4, 2019

#640 in Embedded development

Download history 8/week @ 2022-01-25 4/week @ 2022-02-01 3/week @ 2022-02-08 2/week @ 2022-02-15 15/week @ 2022-02-22 5/week @ 2022-03-01 5/week @ 2022-03-08 29/week @ 2022-03-15 28/week @ 2022-03-22 3/week @ 2022-03-29 6/week @ 2022-04-05 2/week @ 2022-04-12 3/week @ 2022-04-19 65/week @ 2022-04-26 58/week @ 2022-05-03 138/week @ 2022-05-10

264 downloads per month
Used in pygamer-panic-led

MIT/Apache

1.5MB
19K SLoC

Adafruit PyGamer Board Support Crate

This crate provides a type-safe API for working with the Adafruit PyGamer board.

Check out the repository for examples: https://github.com/atsamd-rs/atsamd/tree/master/boards/pygamer/examples

Prerequisites

  • Install the cross compile toolchain rustup target add thumbv7em-none-eabihf
  • Install hf2-cli the uf2 bootloader flasher tool however your platform requires
  • Be in this directory cd boards/pygamer
  • Put your device in bootloader mode usually by hitting the reset button twice.

Uploading an example: cargo run

The .cargo/config in this bsp is preset with hf2-cli as a runner. This means you can use cargo run to both cargo build and attempt to upload:

$ cargo run --release --example blinky_basic

Or even better just your ide's "run" button or hotkey and cargo run will build and upload.

troubleshooting

Note some examples will tell you they need more features enabled

$ cargo run --release --example neopixel_easing
error: target `neopixel_easing` in package `pygamer` requires the features: `math`
Consider enabling them by passing, e.g., `--features="math"`

Just follow the instructions to add --features like

cargo run --release --example neopixel_easing --features="math"
    Finished release [optimized + debuginfo] target(s) in 0.09s
    Searching for a connected device with known vid/pid pair.
    Trying  Ok(Some("Adafruit Industries")) Ok(Some("PyGamer"))
    Flashing "/Users/User/atsamd/boards/pygamer/target/thumbv7em-none-eabihf/release/examples/neopixel_easing"
    Finished in 0.167s
$

Dependencies

~8MB
~255K SLoC