Sie sind auf Seite 1von 13

ELECTRONICS HUB

P R OJ E C T S | T U TO R I A L S | C O U R S E S | K I T S

Your App, Your Language,


Red Hat OpenShift Your Dev Tools. Just Code &
Push. Sign Up Today.
Online Pro
openshift.com

HOME PROJECTS MINI PROJECTS ARDUINO FREE CIRCUITS TUTORIALS SYMBOLS

DIY COURSES CONTACT US

YOU ARE HERE: HOME / ARDUINO / HOW TO PROGRAM ARDUINO?

How To Program Arduino?


NOVEMBER 20, 2016 BY ADMINISTRATOR — 2 COMMENTS

In the previous tutorial, we have seen how to install the Arduino IDE, con gure or install the
required USB drivers and also the basic setup of the IDE for the Arduino board to be
recognized by the IDE. In this tutorial, we will continue with the Arduino IDE by exploring its
features, understanding the basic operation and uploading our rst program to the Arduino
UNO board.

Phyton Device
Programmers
Extremely fast usb programmer for
EPROM/EEPROM devices

phyton.com OPEN

Before proceeding further with the tutorial, connect Arduino UNO board to the computer via
the USB cable as shown in the below image and select the appropriate board and COM port if
it is not done already. There is no need for any external power supply to the Arduino board as it
draws the necessary power from the USB connection.

The programs in Arduino environment are called as Sketches. In the Arduino IDE, the white
space highlighted in the image below is called as Text Editor. This space can be used for
writing all the code for our Arduino boards.
Select the Next Set of Arduino Projects You Want to Learn in Electronicshub: Arduino
Projects»

Before jumping out with excitement and writing our own program, we will rst check out an
example sketch provided in the Arduino IDE. For this, we need to go to the “File” menu and go
to the “Examples” tab. In the drop down menu of the Examples tab, we can see a list of
properly categorized examples like Basic, Analog, Digital, Communication etc.
As a beginner or rst time user, use the Basic examples and in that select the “Blink” sketch. A
new window will be opened with Blink sketch in it. Using the Blink sketch, we are going to turn
ON the LED connected to 13th pin of the Arduino for one second and turn it OFF for one
second in a repetitive fashion i.e. we are going to blink the LED continuously.

Whenever we are beginning with electronics and microcontrollers in particular, the rst project
or program we implement is blinking an LED as blinking an LED in electronics is considered
the equivalent to the Hello World in C.

At this point of time, we will directly upload the sketch without going deeper in to the
programming part of the project. In order to upload the sketch to the Arduino board, we need
to make use of two icons in the Arduino IDE: rst is the “Verify or Compile” and next is “Upload”.
These icons are highlighted in the image below.
The rst icon with a Check mark is the Verify or Compile icon. Using this icon, we can check
whether the written sketch is correct or not in terms of syntax and shows the compilation
errors, if there are any. We upload the sketch only if the compilation is successful without any
errors. Alternatively, we can use a keyboard shortcut Ctrl + R to verify or compile the sketch.

The part at the bottom of the IDE is called as Message window. It displays the status of the
compilation, error messages and the details of the errors. If we compile the sketch using the
rst icon, we can see the status of the compilation and Done Compilation message in the
message window.
If there is an error in the sketch like a missing semicolon or an unclosed bracket, the
compilation stops at that point and the message window points out error along with its type
and location. Using this, we can correct the error.

The second icon adjacent to the Verify icon is the Upload icon. Once the compilation of the
sketch is successful, then we can upload the sketch using this icon. There is a keyboard
shortcut Ctrl + U to upload the compiled sketch. Whenever we click on the Upload icon, the
sketch is compiled before uploading.

As our sketch is compiled successfully without any errors, we can continue with uploading the
sketch. When we click the upload icon, the sketch start uploading and the microcontroller on
the Arduino board gets programmed.

During this time, the TX and RX LEDs on the Arduino UNO board blink as an indication that the
data is being transmitted via the serial port. Once the sketch is successfully uploaded, we can
see a message in the message window as Done Uploading.
The message window also displays some other details like amount of ash memory utilized
by the code, time taken to upload etc.

As the sketch is uploaded successfully, the LED on the Arduino Board, which is connected to
its 13th pin, will start blinking with a gap of one second (or as per the sketch written).

In this tutorial, we have seen how to upload our rst sketch to Arduino UNO board and also
understand some basic features of the Arduino IDE. In the next tutorial, we will analyze the
same sketch and understand the sketch, its components and modify some parameters to
understand them better.
Phyton Device
Programmers
Extremely fast usb programmer for
EPROM/EEPROM devices

phyton.com OPEN

FILED UNDER: ARDUINO

Comments

MOHIT PARIKH says


FEBRUARY 1, 2018 AT 12:25 AM

very good illustration for beginners.


Thanks..

Reply

sauve says
JULY 31, 2018 AT 5:57 PM

how can i get some summary about how to program arduino?

Reply

Leave a Reply
Your email address will not be published. Required elds are marked *

Comment
Name *

Email *

Website

POST COMMENT

Search this website …


Arduino Project

Arduino Programming

Arduino Circuit

Arduino Uno
PROJECTS BY CATEGORY

Arduino Projects (200+)


Electronics Projects (250+)
Mini Project Circuits (160+)
Mini Project Ideas (150+)
ECE Projects (150+)
EEE Projects (150+)
8051 Projects (110+)
Raspberry Pi Projects (101+)
Electrical Project Ideas (100+)
Embedded Projects (100+)
Latest Electronics Ideas (100+)
Microcontroller Mini Projects (100+)
Robotics Projects (100+)
VLSI Projects (100+)
Solar Projects (100+)
IOT Projects (100+)

Communication Projects (70+)


LED Projects (70+)
Power Electronics Projects (60+)
RFID Projects (60+)
Home Automation Projects (50+)
Matlab Projects (50+)
EIE Projects (50+)
Wireless Projects (50+)
LabView Projects (45+)
Zigbee Projects (45+)
GSM Projects (40+)
555 Timer Circuits (40+)
Sensor Projects (40+)
ARM Projects (60+)
DTMF Projects (30+)
PIC Projects (30+)
Electrical Mini Projects (25)
ESP8266 Projects (15)

KITS

Best Drone Kits [12]


3D Printer Kits [12]
Best Robot Vacuum Clears [14]
Best Waveform Generators [12]

LCR Meter
High-Precision

Handheld Smart
Tweezers Get LCR
Impedance Instantly

smarttweezers.com

GENERAL PROJECTS PROJECTS

Tutorials Electrical Mini projects


Symbols Electronics Microcontroller
Courses Embedded Arduino
Calculator Power Solar

Contact Robotics Free circuits


ARM Home Automation
IOT Seminar Topics

Electronics Questions

TUTORIALS TUTORIALS FOLLOW US

Capacitors Ampli ers Instagram


Resistors IO Devices Youtube
Filters Thyristors Facebook
Diodes DC Circuits Google Plus

Transistors Number System Twitter

Copyright © 2018 Electronicshub.org

Das könnte Ihnen auch gefallen