I'm new to Arduino and therefore I've got some questions concerning my programming. I intend to write a program with one LED, a switch and sound. The LED should burn if the switch is turned on (In my current program, it works if the LED is included in the same current circuit, but then the light is very dimmed.) So if the switch is turned on, the sound pin should count how long it has been activated and after a period of time (maybe 5 seconds) there should ne a sound signal. It's important that this sequence repeats itself, when the switch is turned on after being turned off before. When the switch is off, there should be no light nor sound, of course.
Does anyone here has an example I could use for this project? Or has some clues for me, how I could write something like that?
Thanks a lot,