Interrupt driven assembly code. Button press turns on LED and Buzzer. Uses ATmega328P w/ Arduino.
Below is the circuit you need to create for the Button.
Below is the circuit needed in order to control the LED.
Finally, here's the circuit for the Piezo buzzer.
- Note: For the Resistors in the above images, you just need a resistance value big enough to limit the current (so the sucker doesn't blow itself out) and a similar value for the Pull-Up Res.
For added clarity, here's a picture of my spaghetti wiring.