How To Start Programming With Arduino

Table of contents:

How To Start Programming With Arduino
How To Start Programming With Arduino

Video: How To Start Programming With Arduino

Video: How To Start Programming With Arduino
Video: Arduino Tutorial 1: Setting Up and Programming the Arduino for Absolute Beginners 2024, November
Anonim

Do you want to learn how to create electronic gadgets with your own hands, but don't know where to start? Interested in learning the basics of electronics? Then Arduino boards are the best choice for a beginner. In particular, the Arduino UNO board is good for these purposes.

Arduino - basic kit
Arduino - basic kit

It is necessary

  • - Arduino UNO board,
  • - USB cable (USB A - USB B),
  • - Personal Computer,
  • - Light-emitting diode,
  • - 220 Ohm resistor,
  • - a pair of wires 5-10 cm,
  • - if available, breadboard.

Instructions

Step 1

Connect the Arduino board with a USB cable to your computer. The green ON LED on the board should light up.

USB A to USB B cable
USB A to USB B cable

Step 2

Download the Arduino development environment for your operating system (Windows, Mac OS X, Linux are supported) from https://arduino.cc/en/Main/Software, you can install the installer, you can archive. The downloaded file also contains the drivers for the Arduino boards.

Step 3

Install the driver. Let's consider an option for Windows OS. To do this, wait until the operating system prompts you to install the driver. Refuse. Press Win + Pause, launch Device Manager. Find the "Ports (COM & LPT)" section. You will see a port there called "Arduino UNO (COMxx)". Right click on it and select "Update Driver". Next, choose the location of the driver you just downloaded.

Step 4

The development environment already contains many examples for studying the operation of the board. Open the Blink example: File> Examples> 01. Basics> Blink.

Arduino - Open example Blink
Arduino - Open example Blink

Step 5

Tell the development environment your board. To do this, go to Tools> Board and select "Arduino UNO".

Select Arduino board
Select Arduino board

Step 6

Select the port to which the Arduino board is assigned. To find out which port the board is connected to, start the device manager and find the Ports (COM & LPT) section. The port number will be indicated in brackets after the board name. If the board is not listed, try disconnecting it from the computer and, after waiting a few seconds, reconnect it.

How to find out the port number of Arduino
How to find out the port number of Arduino

Step 7

Disconnect the board from the computer. Assemble the circuit as shown in the figure. Please note that the short leg of the LED must be connected to the GND pin, the long one through a resistor with digital pin 13 of the Arduino board. It is more convenient to use a breadboard, but if it is absent, you can twist the wires.

Important note! Digital pin 13 already has its own resistor on the board. Therefore, it is not necessary to use an external resistor when connecting the LED to the board. When connecting the LED to any other Arduino pins, the use of a current-limiting resistor is mandatory!

Image
Image

Step 8

Now you can load the program into the board memory. Connect the board to the computer, wait a few seconds for the board to initialize. Click the Upload button and your sketch will be written to the Arduino board. Arduino programming is very intuitive and not difficult at all. Look at the image - there are small explanations in the comments to the program. This is enough to deal with your first experiment.

Load sketch into memory
Load sketch into memory

Step 9

The LED should start blinking cheerfully at you every 2 seconds (1 second on, 1 off). Your first sketch is ready!

Recommended: