



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Submitted by: NIEPES, AHLEA ELAINE Q. BSEE-3C Submitted to: Engr. Ryan C. Reyes April 13, 2021
Pushbutton is a component that connects two points in a circuit when pressed. In this experiment, pushbutton were used to turn the LED on/off. In circuit 1, the LED is on simply because the pushbutton remains ON, when the pushbutton is on (unpressed) there is no connection between the two legs of the pushbutton, so the pin is connected to 5 volts (through the pull-up resistor) and the output is HIGH. In circuit 2, I noticed that when I pressed both pushbuttons at the same time the LED turns off. When the button is closed (pressed), it makes a connection between its two legs, connecting the pin to ground, so that the output is LOW. Thus, in circuit 3 the gas button speed up the blinking rate of the LED while the brake button slows it down, the reason behind that is the delay function keeps the LED to turn on and off for one second during iteration of the loop function. However, the loop function is perpetually repeated that’s why it will turn the LED light on and off repeatedly. Using the delay function, the code divides each cycle into two parts, making every iteration last for two seconds. During the first second the LED is turned on, and, during the next second it is turned off.