OK don't forget - yous have to become though the Lesson #0 steps to install drivers, software, and verify that your Arduino is powered, has the bootloader installed and shows up as a COM/Serial port... Don't continue unless that has been washed!

Startup!

Double click the Arduino software icon on your desktop

arduino_icon.png

To open up the workspace, besides chosen the IDE. IDE stands for Integrated Development Eastwardnvironment. Basically, a word processor for writing lawmaking. The full name is really a mouthfull, and so nosotros say I.D.E. (Eye Dee Eee)

Anyhow, it looks like this:

arduino_ide.png

The main IDE window has multiple tabs and areas, we'll visit all of these shortly, and then keep your eye on this diagram!

arduino_ide-parts.png

Getting Prepare To Do This Thing!

We're going to jump right in! Earlier you lot tin can run a program on the Arduino you need to tell the IDE where to find it and what kind y'all're going to be programming (as we mentioned in lesson #0 there are dozens of types of Arduinos!)

Select Board Type Arduino UNO

Under the Tools menu, find the Lath submenu and navigate that to select Arduino (Genuino) UNO.

Yous should use this board pick likewise if yous are using an Adafruit Metro or whatsoever other Arduino UNO compatible

arduino_selectuno.png

Select Correct Serial Port

Nearly important y'all volition also need to select the right Serial port. This is where people tin get tripped upwardly. The skilful news is if y'all take a 18-carat Arduino UNO, the proper name will announced side by side to the series port menu item to go far easy to pick out!

arduino_selectCOM.png

arduino_Screen_Shot_2016-07-19_at_9.05.32_PM.png

If y'all have an Arduino compatible like Adafruit Metro, you may not run into annihilation later the Serial port proper name, but information technology volition nonetheless be the only pick available that is not COM1 or something with Bluetooth in the proper noun

arduino_metro.png

~~ Hints! ~~

Windows: It will never be COM1 don't pick that ane. Y'all should simply have 1 other choice.

Mac OS X and Linux: Information technology will never exist an option with 'bluetooth'  in the proper name, look for /dev/cu.usbmodem or /dev/cu.usbserial or /dev/ttyUSB or like!

Take lots of Serial ports? Endeavor unplugging your Arduino and seeing which port disappears next time you expect at the Ports list!

The board and serial port preferences are saved so you but accept to set up it once, the program volition remember next time it's run.

However, if y'all have multiple Arduino's, they may be assigned difference COM ports. So every fourth dimension you plug in a new Arduino, double bank check that the correct port and type is selected!

Open Blink Sketch

Sketches are little scripts that you can send to the Arduino to tell it how to act. Let's open upward an Case Sketch. Go to the File menu -> Examples -> 01.Basics -> Blink

arduino_blinksketch.png

This should open up a new window that should now look like this, with a agglomeration of text in the center white space. Above the text is a tab labeled Blink

arduino_blinkopened.png

Verify / Compile

Let's proceed going! The first stride to getting a Sketch ready for transfer over to the arduino is to Verify/Compile it. That ways bank check it over for mistakes (sort of similar spell-checking or grammatical editing) then interpret it into an app that is compatible with the Arduino hardware.

Verify: Like having a friend wait over your homework essay before handing it in, verifying means the Arduino software will cheque over and look for typos, common errors - it can't take hold of all errors, just like a spellcheck wont be able to tell that you lot spelled "acquit" like "bare" by accident since both are proper words

Compile: check your music player and you'll probably find you own at to the lowest degree i compilation, which means a drove that someone put together in a specific guild. When Arduino compiles your sketch, it is putting/arranging it together into the correct order for your Arduino hardware board to exist able to run

While in theory yous could take Arduino do each ane separately, it'due south faster to just take it do both at the same fourth dimension

You can first the action via the Sketch menu

arduino_verifycompile.png

After a few seconds, you lot should encounter the message Done compiling. in the Status Bar and Sketch uses ... bytes (x%) of program storage space (or something like) in the Plan Notification Surface area.

This means the sketch was well-written and is ready for uploading to the Arduino board!

arduino_compiled.png

Upload

Set for the moment of truth? Now it'south time to upload your very starting time sketch. Make certain the Arduino is plugged in, the green light is on and the correct board and Serial Port is selected.

Select Upload from the Sketch menu

arduino_upload.png

After a few seconds yous should become this screen, with the message Done uploading. in the status bar.

arduino_doneuploading.png

Things That Can Go Incorrect...

Arduino bootloader doesn't answer

If you get the post-obit mistake message avrdude: stk500_getsync(): not in sync or avrdude: stk500_recv(): programmer is not responding that means that the Arduino bootloader is non responding

arduino_stk500err.png

This error tin can exist acquired by a lot of issues. Check the following:

  • Is the correct Arduino Board selected?
  • Is the correct Serial Port selected?
  • Is the right commuter installed?
  • Is something continued to the Reset pin or pressing the reset push?
  • Endeavour disconnecting all connected shields, jumper wires and components
  • Is the fleck inserted into the Arduino properly? (If you built your ain arduino or have burned the bootloader on yourself)
  • Does the flake have the right bootloader on it? (If you built your own arduino or have burned the bootloader on yourself)

You tin also check Lesson #0 on how to verify if the bootloader is installed

Can't open serial port device

If you get an error like avrdude: ser_open(): tin can't open device it likely means your Arduino got disconnected from USB somehow

arduino_cantopendevice.png

This error can be caused past a few possible issues. Check the following:

  • Is the correct Serial Port selected?
  • Is the correct driver installed?
  • Endeavour unplugging/replugging the USB cable
  • Endeavor another USB cable or USB port
  • Your reckoner's USB organization may have crashed. Shutdown your computer, disconnect power, wait 3 minutes then restart it

Video of all steps

Here is a video showing the timing of the steps described so far, opening the Glimmer sketch and setting the board and series port.

Sentry!

If y'all have a UNO Arduino, the upload process is quite fast: Once you click Upload from the software the IDE will ask the Arduino to reset itself into the bootloader and immediately outset uploading the blink sketch. After uploading, the sketch is quickly verified - the IDE asks the Arduino 'delight repeat back what I but asked to you to exercise' - and reset again to get-go running the sketch.

The little translucent L LED will start blinking on and off, a 2d on and a 2nd off.

Here's a looping animation showing upload and so 3 blinks: notice the RX and TX LEDs glimmer during upload, but information technology happens very fast!

This guide was outset published on Sep 01, 2016. Information technology was last updated on Sep 01, 2016.

This folio (Upload Your Beginning Sketch) was concluding updated on Jun 15, 2022.

Text editor powered by tinymce.