Create first project on Arduino

To start programming Arduino download official Arduino IDE software from the site: https://www.arduino.cc/en/Main/Software

If you use Arduino Nano, you need to install CH341 driver. Next connect Arduino to PC via Mini-USB cable:

Run Arduino IDE, go to Tools -> Board and set correct Arduino model, processor and serial port:

Correct port you can see in Device Manager in the section “Ports (COM & LPT)”:

If all is OK you can go to Tools -> Get Board Info and watch information about your Arduino:

Now let’s write first program on Arduino which will blink onboard led indicator. Arduino has 14 digital PIN for digital devices and 8 analog PIN for analog devices. Our led indicator connected to 13 digital pin.

In function setup() let’s say Arduino that 13 digital PIN will work in output mode:

void setup() {
  pinMode(13,1);
}

All commands in loop() function Arduino will execute in a loop. Command digitalWrite(13,1) activates 13 PIN, command digitalWrite(13,0) similarly deactivate 13 PIN on Arduino.
Command delay(1000) set delay in milliseconds between commands:

void loop() {
  digitalWrite(13,1);
  delay(1000);
  digitalWrite(13,0);
  delay(1000);
}

Next let’s compile our first program and write it to Arduino controller:

That’s all. Our first Arduino project is done. 😉

Leave a Reply

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