eel4746_avr_piano

For our Microprocessor's class final project, we chose to make a chiptune piano using AVR C on two Arduino UNOs.
Log | Files | Refs | README | LICENSE

commit 4644a4b0ae20267b9692885b2bacc6b467b382ac
parent 21a33a8cdcc8944a5fa4e83d7005797ab25deaaa
Author: Vineet K <git@vineetk.net>
Date:   Sun, 21 Apr 2024 22:21:24 -0400

send note in play_note() function

Diffstat:
Mnotes.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/notes.c b/notes.c @@ -192,6 +192,8 @@ play_note(unsigned char _note, unsigned short _cycles) { note = _note; + usart_send(note); + if (note != 255) { for (unsigned short i = 0; i < _cycles; i++) playtone(); @@ -247,9 +249,6 @@ main(void) // if a button was released, then send note and cycles played if (cycles > 0) { usart_send(tmp); - usart_send(HIGH(cycles)); - usart_send(LOW(cycles)); - usart_send(0xff); cycles = 0; } continue;