mirror of
https://codeberg.org/eel4746_piano/avr_piano.git
synced 2024-11-25 02:30:30 -05:00
send note in play_note() function
This commit is contained in:
parent
21a33a8cdc
commit
4644a4b0ae
5
notes.c
5
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;
|
||||
|
Loading…
Reference in New Issue
Block a user