Uploading Code to Arduino and Using Serial Monitor

This post is assuming you’ve read my previous post, Arduino Serial Hello World. There you learned how to write the “Hello World” code, in preparation for output to the Serial Monitor. By now you should also understand the Basics of Arduino. These 2 are the prerequisites of this project. You could, of course, just copy my code and upload it.

Let’s get started!

I’ll be using the Arduino Uno, this is the most commonly known device that is used for Arduino programming. If you’ve read the Arduino Serial Hello World post, you’ll already have the code in your IDE.  If not, you can copy the following code and paste it in the Arduino IDE.

//Hello world example code
//This will be an introduction to Arduino, via serial communication
char myString[] = "Hello World!";

void setup() // This only runs once, right when you start the sketch
{
 Serial.begin(9600); // Instantiate serial with a buad rate of 9600 bps
 
}

void loop() // Runs forever
{
 Serial.println(myString); // Prints Hello World! via the string that we created pre-setup
 delay(1000); // Pauses for 1 second
}

Let’s get connected

If you haven’t already, you may want to configure your IDE for connection with the board. Following the configuration process allows the IDE to properly communicate with the board. It’s a very simple process, so it shouldn’t take too long.

After you do your one time configuration process, you’re ready to start uploading! Let’s plug USB in to the Arduino, and the other side into your computer.

You may notice I’m not using the default USB that came with the Arduino Uno. I choose to use a longer USB, because it helps keep my work area clutter free. Once you start more complex projects, you may run out of room in your work area.

Let’s upload

Now that you’re connected, you may see that the LED’s came on when plugging in your device. It’s alive! If you have it configured properly, you’re ready to upload. Click the arrow that points to the right, at the top left of your screen.

Now that you’re uploading, you can watch the progress in the black area at the bottom of your screen. There’s also a small progress bar that shows how it’s going.

This process should be very fast, on such a small sketch. When you start diving in to libraries, and using more complex code, it’ll take a little longer.

Where’s my output?

Now you’ll open the serial monitor. This is where the Arduino can send messages back to your computer. This is a very good area to try to use for debugging things. Click the icon that looks like a magnifying glass, at the top right of your screen.

If all is going well,  you’ll see the Arduino communicating with the Serial Monitor. It should say “Hello World!”. You’d think it would have more to say than that, but it really only talks about the things we tell it to. If you’re not talkative, neither is your Arduino, unfortunately. Don’t expect your Arduino to be the conversation starter, you’re the one in control here.

Thanks!

I hope you found this easy to follow, let me know in the comments if you have any questions. I’m here to help you, and I’d be more than happy to do so. Feel free to Subscribe below, you’ll find that I’m going to slowly work you in to more complex development. I feel you’d benefit from it a lot, if you follow along.

Join the newsletter

Subscribe

Subscribe to get our latest content by email.

We won't send you spam. Unsubscribe at any time. Powered by ConvertKit

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.