Professional Documents
Culture Documents
Arduino Education: Basic Concepts
Arduino Education: Basic Concepts
EDUCATION
Basic Concepts
• Variable Declaration
I • Name
• Set Up
• Instructions
• Commands in this bracket will run • Commands in this bracket will run
once at startup. again and again.
INPUT OUTPUT
Sensors, LED,
Potentiometers Motor
Pin Mode • For input setup,
1 2 3 4
Open Arduino Go to File > Upload the LED on the
IDE. Example > program. board will start
Basics > Blink. blinking.
1. Write "pinMode(5, INPUT);" in setup bracket.
Digital
number 5.
}
else {
}
Input 2.
bracket.
• First we have to set up the speed(Baud Rate) between communication. Write "Serial.begin(9600);"
in setup bracket.
Instead of the digital or analog signals, you can send or receive text.
The serial port uses the digital pins 0 and 1:
Pin 0: RX or receiver. Receives data to the board.
Pin 1: TX or transmitter. Sends data from the board.
digitalRead ( ) and digitalWrite ( ) on these pins cannot be used while using
serial communication.
The sender and receiver are communicating in the
same speed.
The speed is called baud rate and measures bits per
second.
The most common speed is 9600 bits per second.
Sending to computer
To send a message from the control board to the computer,
“ Serial.begin ( ) and Serial.println ( ) or Serial.print ( )”
commands are used.
in the IDE.
Instructions