This is documentation of my work and questions throughout the semester
Press or flip lever, connect two contacts so electricity can flow
(Small tactile switches used in labs have 4 connections)
LED- shorter negative leg on the left
‘ledPin’ is output pin
‘buttonApin’ is switch near top of breadboard
‘buttonBpin’ is other switch nearer bottom
The set up function defines the ledPin as being an OUTPUT as normal, since we have 2, the pinModes must be designated and codes seperate
The pit mode of INPUT_PULLUP means that the pin is to be used as an input
The loop contains two ‘if’ statements, one for each button. each has an ‘digitalRead’ on appropriate input
If button is pressed, corresponding input is LOW
Here is my completed set up on the breadboard:
Question: The light turns on when clicking red button on COM3, but switches are not working and controling the light