red line is 12 volts, green line is 5 volts 120 volt ac power Source mechanical
ID: 2080282 • Letter: R
Question
red line is 12 volts, green line is 5 volts 120 volt ac power Source mechanical relay :::::::::::E 1. pin A3 is wired to the midpoint of the photocell, 2.2k circuit 2. pin o is wired to the 1k wired to the base of the NPN trans. 3. pin 2 is wired to the left pushbutton 4. pin 4 is wired to the right pushbutton. 5. pin 11 is wired to the Red LED 6. pin 13 is wired to the Green LED The NPN transistor is set up as Collector Base Emitter from left to right 12 volt dc power Source O O black is groundExplanation / Answer
1. Upper schematic is used. In arduino board, pin4 is connected to one point of push botton and other point of push botton is grounded. When the pushbutton is open (unpushed) there is no connection between the two points of the pushbutton, so the pin is connected to ground (through the pull-down resistor) and we read a LOW(0). When the button is closed (pushed), it makes a connection between its two points, connecting the required pin to 5 volts, so that we read a HIGH(1).
2. for input, digitalRead is used and for output, digital write is used. here push botton is used to give input, so digitalRead(2) is used. Because left push botton is connected through the pin2.
3. when right push botton is pused its two points are connected, so the output is high. so the value is 1.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.