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

Startup!

Double click the Arduino software icon on your desktop

arduino_icon.png

To open up upward the workspace, also called the IDE. IDE stands for Integrated Development Environment. Basically, a give-and-take processor for writing code. The full name is actually a mouthfull, and then we say I.D.E. (Centre Dee Eee)

Anyhow, it looks like this:

arduino_ide.png

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

arduino_ide-parts.png

Getting Ready To Practise This Affair!

Nosotros're going to leap correct in! Before you can run a programme on the Arduino you demand to tell the IDE where to observe it and what kind you lot'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 Board submenu and navigate that to select Arduino (Genuino) UNO.

Y'all should use this board pick too if you are using an Adafruit Metro or whatsoever other Arduino UNO compatible

arduino_selectuno.png

Select Right Series Port

Near important yous will as well need to select the right Series port. This is where people can get tripped up. The good news is if yous have a genuine Arduino UNO, the name will appear adjacent to the serial port menu item to make it easy to option out!

arduino_selectCOM.png

arduino_Screen_Shot_2016-07-19_at_9.05.32_PM.png

If you have an Arduino compatible like Adafruit Metro, you may not meet anything afterwards the Serial port name, just information technology will still exist the only option 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 one. You should only have one other selection.

Mac Bone X and Linux: It volition never be an option with 'bluetooth'  in the name, wait for /dev/cu.usbmodem or /dev/cu.usbserial or /dev/ttyUSB or similar!

Have lots of Serial ports? Try unplugging your Arduino and seeing which port disappears adjacent time you look at the Ports list!

The lath and serial port preferences are saved then you only have to set it once, the plan will think side by side time it'due south run.

However, if yous have multiple Arduino's, they may exist assigned divergence COM ports. So every time yous plug in a new Arduino, double check that the correct port and type is selected!

Open Glimmer Sketch

Sketches are lilliputian scripts that you can send to the Arduino to tell it how to human action. Allow's open up an Case Sketch. Go to the File carte du jour -> Examples -> 01.Basics -> Blink

arduino_blinksketch.png

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

arduino_blinkopened.png

Verify / Compile

Let'south keep going! The first step to getting a Sketch set up for transfer over to the arduino is to Verify/Compile it. That means check it over for mistakes (sort of like spell-checking or grammatical editing) and then translate it into an app that is compatible with the Arduino hardware.

Verify: Similar having a friend look over your homework essay before handing it in, verifying means the Arduino software will check over and expect for typos, common errors - information technology can't catch all errors, simply like a spellcheck wont be able to tell that you spelled "bear" like "blank" by accident since both are proper words

Compile: check your music player and you'll probably observe yous ain at least i compilation, which means a collection that someone put together in a specific lodge. When Arduino compiles your sketch, it is putting/arranging it together into the right order for your Arduino hardware board to exist able to run

While in theory you could have Arduino do each one separately, information technology'southward faster to only have it practice both at the same time

You tin can start the activeness via the Sketch menu

arduino_verifycompile.png

After a few seconds, you should see the message Done compiling. in the Condition Bar and Sketch uses ... bytes (x%) of program storage infinite (or something similar) in the Program Notification Area.

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

arduino_compiled.png

Upload

Ready for the moment of truth? Now it's fourth dimension to upload your very first sketch. Brand sure the Arduino is plugged in, the light-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 you lot should go this screen, with the message Done uploading. in the status bar.

arduino_doneuploading.png

Things That Tin Get Wrong...

Arduino bootloader doesn't answer

If you get the following error 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 can be acquired past a lot of issues. Bank check the post-obit:

  • Is the correct Arduino Board selected?
  • Is the right Series Port selected?
  • Is the correct driver installed?
  • Is something connected to the Reset pivot or pressing the reset button?
  • Try disconnecting all continued shields, jumper wires and components
  • Is the chip inserted into the Arduino properly? (If you built your own arduino or have burned the bootloader on yourself)
  • Does the chip have the right bootloader on it? (If you congenital your own arduino or have burned the bootloader on yourself)

Y'all tin can likewise check Lesson #0 on how to verify if the bootloader is installed

Can't open serial port device

If you go an mistake like avrdude: ser_open(): can't open device it probable means your Arduino got disconnected from USB somehow

arduino_cantopendevice.png

This error can exist caused by a few possible bug. Bank check the following:

  • Is the right Serial Port selected?
  • Is the right commuter installed?
  • Try unplugging/replugging the USB cable
  • Try another USB cable or USB port
  • Your computer'southward USB system may have crashed. Shutdown your reckoner, disconnect power, await 3 minutes and so restart it

Video of all steps

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

Watch!

If you have a UNO Arduino, the upload process is quite fast: One time y'all click Upload from the software the IDE will enquire the Arduino to reset itself into the bootloader and immediately start uploading the blink sketch. After uploading, the sketch is quickly verified - the IDE asks the Arduino 'delight repeat back what I merely asked to you to practice' - and reset once more to first running the sketch.

The lilliputian translucent L LED volition outset blinking on and off, a second on and a second off.

Here's a looping blitheness showing upload and then iii blinks: notice the RX and TX LEDs blink during upload, simply it happens very fast!

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

This page (Upload Your Start Sketch) was last updated on Apr sixteen, 2022.

Text editor powered past tinymce.