Learn Programming and Electronics with Arduino

Everything you need to know about the Arduino IDE (for now) Video

Learn Programming and Electronics with Arduino

Show Notes

Discussion: Now that you have downloaded and set preferences, you need to become familiar with the Arduino Integrated Development Environment, or IDE for short. It works just like a text editor program. I'm only going to cover what I think is important for us to know right now. We do a deeper dive on an as needed basis as we progress through the course. Specifically, in this lesson we'll cover: Selecting an Arduino Board and Serial Port Saving an Arduino File The Editor, Message Area, and Console A Few Other "Good to Know" Items So let's open the Arduino Integrated Development Environment (IDE) and get started. Do this by clicking the Arduino icon. Which Board and Serial Port Should I Use? The first thing we're going to discuss is selecting the correct board. We have to let the Integrated Development Environment know what Arduino board you're using. Go to the "Tools" tab, and then go down to where it says "Board". You'll notice I selected the Arduino Uno since that is what I will use throughout the course.

I recommend that you use an Uno or an Uno derivative throughout the course, as well. This will standardize our work in these lessons. Once you've selected the board, next you need to select your serial port. People can sometimes be intimidated by this technical term, but you don't have to be. Serial ports are just the different things connected to your computer. The easiest way to find out which of the ports listed is your Arduino is to first unplug the Arduino from the computer. Go to the ports list under the "Tools" tab, and write down the names of these ports.

You only need to write enough to differentiate one from the next - maybe the last word or last few letters. Then, close your Arduino IDE. Plug your Arduino board back in via the USB cable to your computer. Open the Arduino IDE.

You should now be able to see an additional serial port not on the list you originally wrote down. That will be the serial port to which your Arduino is connected. For Mac, you'll usually see cu or tty after the "dev/". Those are the common ways Arduino will show up on the serial port for a Mac. For a PC, it shows up as a COM port, but it's hard to know which one it will be. It could be one, two, four, etc. That's why the best method, although primitive, is just to unplug and plug the Arduino back into that port. Once you've chosen the board and port the first time, these settings will stay the same for any subsequent times you reopen the Arduino IDE. The reason I point this out is that if you happen to get a different board at some point, you will have to remember to change the board that is selected. The Arduino File When you open the Arduino IDE for the first time, it will open up a file for you, giving it a default name. That default is sketch, underscore, and the current date.

That name also appears at the top of the IDE, along with the version of Arduino you're using. To save this, go to the "File" tab and then to "Save". It's just like saving any other file. Notice it asks you to save the file in "Documents".

Remember that in Arduino, files are referred to as sketches. So, the collection of our sketches is known as the sketchbook. The sketchbook folder is where all of the sketches we write will be saved. Of course, you can also nest your files in that folder just like you could in any other program where you're saving files. It's really no different. Take a look at the name I chose for my file. There are certain rules you must follow when choosing a name for your sketch. When you're naming a file, you can't use any spaces between the words. One common method is to use an underscore where you would have normally preferred a space. You can't use special characters, either. You can use numbers in the name, but you can't have a number as the first character. Lastly, the names are limited to 64 characters. So, using these rules, name your sketch and save it.

You'll see that the name on the tab and at t

More from Learn Programming and Electronics with Arduino

Apr 28, 2017

Have you seen some really cool stuff being made with a thing called Arduino? What is Arduino anyway? It sounds like an Italian sandwich with extra cheese or something... Well - it's that and a lot more. I hope this video can help explain some the basic premise of the Arduino!

Apr 27, 2017

Have you ever wanted to change the font color in the Arduino IDE? Maybe it is hard for you to read the light grey comments in the Arduino IDE, or maybe you prefer something a little bolder. Whatever your reason, in this short video, I demonstrate a relatively easy way to change the font color of comments.

Apr 26, 2017

In many cases while using an Arduino, you will want to see the data being generated by the Arduino. One common method of doing this is using the Serial.print() function from the Serial library to display information to your computer's monitor.

Apr 25, 2017

In many cases while using an Arduino, you will want to see the data being generated by the Arduino. One common method of doing this is using the Serial.print() function from the Serial library to display information to your computer's monitor. In this week's episode, we will talk about the intricacies of the Serial.print() function. This is the first part, of a two part series on the Serial.print() function. Here are the specific topics we will cover in this lesson: Why would you want to use the Serial.print() function? A brief overview of the Serial library The basic use of the Serial.print() function

See all episodes →