PComp Quiz (Digital In, Digital Out)

Draw a circuit for connecting a pushbutton as a digital input to a microcontroller. Connect it so that the digital input pin gies HIGH when the button is pushed. What does the resistor (called a pulldown resistor) do?

A pulldown resistor makes a higher voltage lower but offering degrees of resistance so that the current that flows through it is smaller, like a funnel.

Write a program that reads a digital input to an Arduino and turns off an LED whenever the digital input goes LOW. Draw the schematic that goes with this program as well.

if(analogRead(SwitchPin,HIGH)) { digitalWrite(LedPIN,HIGH); }

Write a program that reads a digital input and prints out a message when the input changes from HIGH to LOW.


Leave a Reply

Your email address will not be published. Required fields are marked *