How can I add a LED to this build? I recreated this project from Fritzing in my circuits.io project then on the arduino itself, it all works fine just how I wanted it.

The concept behind it is:


You plug it in and the time is set to 00:00
You can adjust the time to the time now let's say 22:46
You can put in an alarm to wake up let's say an hour later at 23:46
The piezo beeps in stops, so not continious.


So now my question is, how can I add a led that flickers on the same rhythm as the piezo (when the alarm goes off)? Can someone help me in my circuits.io project?

An update/edit would be great! I'm relatively new to all of this.

Thanks a lot!
You need to add an LED and series resistor between a currently unused Arduino pin and ground.
In your setup() function, set that pin's i/o mode to OUTPUT.
Where the code turns the tone on, it should also make the LED pin HIGH.
Where the code turns the tone off, it should also make the LED pin LOW.