Step 13Preparing the Pushbutton Switch
Prepare two pieces of stranded wire by cutting to length and stripping both ends. Make sure that the wires are long enough so that the lid of the tin can fully open. Solder to two appropriate pins on the switch and then slide pieces of heatshrink tubing over the joints to protect and strengthen them. Solder to other to ends into their respective holes on the board.
Carefully thread the wires between the LEDs and make sure they don't sit on top of the batteries. I spread the two pins on the switch so that the rightmost LED slipped between them. The pins on the switch are VERY fragile (the other two snapped off).
Note the pin PA7 PCINT7 6 is set up to listen for a change in state. Pressing the pushbutton switch pulls the pin high and SIGNAL(PCINT0_vect) is executed. Based on the length of the button press, either nothing happens (crude debouncing), the state is advanced (short press), or the program is advanced (long press).
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|





















































