Created
July 13, 2018 02:36
-
-
Save Herschel/5cd953c5984a9da66a043beb41b3fc8c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![deny(unsafe_code)] | |
#![no_std] | |
extern crate aux5; | |
use aux5::prelude::*; | |
use aux5::{Delay, Direction, Leds}; | |
fn main() { | |
let (mut delay, mut leds): (Delay, Leds) = aux5::init(); | |
let delay_time = 250_u32; | |
loop { | |
leds[Direction::West].off(); | |
leds[Direction::North].on(); | |
delay.delay_ms(delay_time); | |
leds[Direction::Northwest].off(); | |
leds[Direction::Northeast].on(); | |
delay.delay_ms(delay_time); | |
leds[Direction::North].off(); | |
leds[Direction::East].on(); | |
delay.delay_ms(delay_time); | |
leds[Direction::Northeast].off(); | |
leds[Direction::Southeast].on(); | |
delay.delay_ms(delay_time); | |
leds[Direction::East].off(); | |
leds[Direction::South].on(); | |
delay.delay_ms(delay_time); | |
leds[Direction::Southeast].off(); | |
leds[Direction::Southwest].on(); | |
delay.delay_ms(delay_time); | |
leds[Direction::South].off(); | |
leds[Direction::West].on(); | |
delay.delay_ms(delay_time); | |
leds[Direction::Southwest].off(); | |
leds[Direction::Northwest].on(); | |
delay.delay_ms(delay_time); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment