Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Latest commit

 

History

History
31 lines (20 loc) · 1.32 KB

README.md

File metadata and controls

31 lines (20 loc) · 1.32 KB

Deprecation Note:

Refer to the examples in avr-hal instead.

For Arduino Leonardo, they can be found in boards/arduino-leonardo/examples.

Arduino Leonardo Examples in Rust

A few examples of using the arduino-leonardo, atmega32u4-hal and atmega32u4 crates.

  • blink: Blink the three onboard LEDs
  • interrupt: Setup a pin interrupt and show how to install a handler
  • pwm: Demo of setting a pin into PWM mode

For easily uploading the compiled demos to your Leonardo, there are two scripts available:

  • mkhex.sh: Convert the .elf that rust produces to a .hex that can be flashed. Also outputs the size of the final binary. Supply either blink, interrupt or pwm as commandline argument.
  • flash.sh: Upload a .hex file to your board. You need to press the reset button before calling this script! Supply either blink, interrupt or pwm as commandline argument.

License

Licensed under either of

at your option.