Keyestudio KS0436 Kit Manual page 25

Table of Contents

Advertisement

states tells the Arduino board that we are going to use the LED pin as
an output.
void loop()
It is also mandatory for a sketch to have a "loop" function. Unlike the
'setup' function that only runs once, after a reset, the 'loop' function
will, after it has finished running its commands, immediately start
again.
pinMode(ledPin, OUTPUT)
 Input Or Output ?:
Before you can use one of the digital pins, you need to tell the UNO
Board whether it is an INPUT or OUTPUT.
We use a built-in "function" called
digital output.
digitalWrite(ledPin, HIGH)
Digital Output :
digitalWrite(ledPin, LOW)
When you're using a pin as an OUTPUT, you can command it to be HIGH
(output 5 volts) or LOW (output 0 volts).
 What happens when you change the number in one or both of the
delay(1000)
pinMode()
to make pin 10 a
25

Advertisement

Table of Contents
loading

Table of Contents