I’d like to schedule a trip to Jerusalem. I would like it similar to that on this
[Website] (https://werner. rothschopf. net/microcontroller/202103_arduino_reise_nach_jerusalem. htm)
programming. However, with random music speed and duration and the lights should go on and off in a circle until the music goes off and then you have to press fast. The music should be the Tetris music and when the round is over maby a Mario loose sound
something for @noiasca ?
ich weiß nicht wie ich die Musik ändere und irgendwie funktioniert das nicht weil als ichs angeschlossen habe kahm keine Musik und kein taster gieng
the notes of the melody are stored in this variable:
const uint8_t song[] {49, 33, 37, 33, 49, 33, 37, 33, 37, 41, 44, 37, 41, 44}; // ein Song als Melodie
But what do these numbers mean, I'm used to put tone, delay, noTone, delay in my program
this a the notes which will be played in that order.
See also this Arduino example:
They use also an Array for the notes.
I just build it up in Wokwi ...
There was a bug in row 61.
Change it to
if (currentMillis - previousMillis > interval) // Es ist Zeit für die nächste Note
and it will work.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.