New Years Eve 2020

This commit is contained in:
Tangent Wantwight 2020-12-31 14:15:09 -05:00
parent 090e276bc8
commit a78d6faba9
3 changed files with 28 additions and 0 deletions

View File

@ -22,6 +22,7 @@ valentines-2020 = ["replace-default"]
st-patricks-day = ["replace-default"]
july-4 = ["replace-default"]
halloween-2020 = ["replace-default"]
new-years-eve-2020 = ["replace-default"]
november-2020 = ["replace-default"]
[dependencies]

View File

@ -14,6 +14,7 @@ mod st_patricks_day;
mod july_4;
mod halloween_2020;
mod november_2020;
mod new_years_eve_2020;
mod door_light;
#[entry]
@ -44,6 +45,9 @@ fn main() -> ! {
#[cfg(feature = "halloween-2020")]
halloween_2020::run(&mut lights);
#[cfg(feature = "new-years-eve-2020")]
new_years_eve_2020::run(&mut lights);
#[cfg(feature = "november-2020")]
november_2020::run(&mut lights);

View File

@ -0,0 +1,23 @@
use super::delay;
use core::iter::repeat;
use house::Harrogate;
use lights::rgb::Rgb;
use lights::{HardwareRgb, Lights};
const WHITE: Rgb = Rgb(255, 255, 255);
const YELLOW: Rgb = Rgb(255, 255, 0);
#[allow(dead_code)]
#[inline(always)]
pub fn run(lights: &mut impl Lights<Pixel = HardwareRgb>) -> ! {
let pattern = Harrogate {
porch_back: repeat(YELLOW),
porch_front: repeat(WHITE),
};
loop {
pattern.clone().render_to(lights);
delay(48_000_000);
}
}