You are on page 1of 3

Your first steps with Arduino programming -

Summary

Download and install the Arduino IDE

- Download from this link : ​https://www.arduino.cc/en/Main/Software


- Go in the “Download the Arduino IDE” section and select your operating system to get
the correct version

Upload a program

- Connect your Arduino board to your computer


- Go to the “Tools” menu
- Select the correct Arduino board type
- Select the port where your Arduino board is plugged (it should be automatically
selected)

- Click on the upload button (arrow icon on the top left of the screen), and wait until you
see “Done uploading” at the bottom of the screen
Arduino Architecture

- This code is the minimum code for an Arduino program


- The “setup” function is called once, when the program starts
- Use the “setup” to initialize some components, initiate a communication, etc
- The “loop” function is then called forever (its name is clear, this is a loop)
Debug a program with Serial communication

- Open the serial monitor by clicking on the loop icon on the top right of the screen
- Initialize the communication in the “setup” function with Serial.begin(baudrate).
- 9600 is a pretty common baudrate value to start
- Select the same baudrate in the serial monitor
- !!! The baudrate should be the same on both sides of the communication !!!

- Use Serial.println(text or value here) to send a message from the Arduino to your
computer. You will see this value appear in the serial monitor

Reset a program

- At any moment you can choose to restart an Arduino program :


- Just unplug/plug the Arduino board
- Or upload the code again
- Or (much simpler and better), press the reset button (red) on the Arduino board

You might also like