Arduino Analog Pin Kullanımı. Sets the digital pin 7 as input void loop val digitalreadinpin. Led connected to digital pin 13 int inpin 7.

To use an additional led attach its longer leg the positive leg or anode to digital pin 13 in series with the 220 ohm resistor and its shorter leg the negative leg or cathode to the ground gnd pin next to pin 13. Variable to store the value read void setup serialbegin 9600. Led connected to digital pin 13 int inpin 7.
Int val 0.
Int analogpin a0. So that before the dress switches color it goes with sounds from the movie of the fairies saying oh no not pink. Read the input pin digitalwriteledpin val. Each pin has an internal pull up resistor which can be turned on and off using digitalwrite w a value of high or low respectively when the pin is configured as an input.