From 5df6d9e67bbfd7dfe178e8b02eb9e8a69084c519 Mon Sep 17 00:00:00 2001 From: ZennDev1337 Date: Mon, 18 Sep 2023 16:24:18 +0200 Subject: [PATCH] reset the game lib --- Project/game/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Project/game/src/lib.rs b/Project/game/src/lib.rs index 7c73a51..b08c68d 100644 --- a/Project/game/src/lib.rs +++ b/Project/game/src/lib.rs @@ -4,8 +4,10 @@ //Include the Arduboy Library #[allow(unused_imports)] use arduboy_rust::prelude::*; +use arduboy_tone::arduboy_tone_pitch::*; #[allow(dead_code)] const arduboy: Arduboy2 = Arduboy2::new(); +const sound: ArduboyTones = ArduboyTones::new(); // Progmem data @@ -18,6 +20,7 @@ pub unsafe extern "C" fn setup() { arduboy.begin(); arduboy.set_frame_rate(30); arduboy.clear(); + sound.volume_mode(VOLUME_ALWAYS_NORMAL); } // The loop() function repeats forever after setup() is done @@ -28,6 +31,9 @@ pub unsafe extern "C" fn loop_() { if !arduboy.next_frame() { return; } - + sound.tone3(NOTE_C3, 500, NOTE_D3, 250, NOTE_E3, 1000); + delay(2000); + sound.tone2(NOTE_C3, 500, NOTE_D3, 250); + delay(2000); arduboy.display(); }