top of page
  • yz7720

Digital Input and output, Analog Input and Sensor Change

1. Digital Input

  • When the button is pressed, turn the red LED on and the yellow one off. When the pushbutton is released, turn the yellow LED on and the red LED off.

  • Digital Input is like a yes or no answer, there is nothing in between like an analog input.



2. Analog Input

  • Potentiometer is used to change the brightness of the LED




3. Read the Pushbutton’s State Change


  • Print "Button was just pressed" when the pushbutton is pressed.














4. Force Sensing Resistor (FSR)

  • Force sensing resistor connected to breakaway socket headers

  • By pressing the FSR, we can change the state of the LED




I found this part a bit confusing than the other labs. There are 2 things I did wrong at the beginning, but was fixed later. The first is the bottom thread of the FSR is the one needs to be connected to the analog input pin, instead of the top thread. The second is the long side(Anode) of the LED should be connected to the analog output pin, instead of the short side (Cathode).





3 views0 comments

Recent Posts

See All

コメント


Post: Blog2_Post
bottom of page