A Beginner

Want to build your next DIY project using an Arduino board? Here’s an easy guide to help you get started with the popular microcontroller family. The Arduino family is quite … Read more

Taylor Bell

Taylor Bell

Published on May 14, 2024

A Beginner

Want to build your next DIY project using an Arduino board? Here’s an easy guide to help you get started with the popular microcontroller family.

A person holding an Arduino Uno

The Arduino family is quite popular for implementing complex project ideas that involve circuitry, IoT, and robotics. Despite being mistaken for SBCs like the Raspberry Pi series, the Arduino boards are microcontrollers, and there’s a world of difference between both lineups.

Their dissimilarities also extend to the software aspect, with the Arduino boards featuring a completely different initialization procedure than SBCs. Although configuring them is far simpler than it may seem, setting it up can be rather challenging for first-time users. So, here’s a detailed guide to help you get started with programming your Arduino.

An Arduino and a Raspberry Pi kept side-by-side

Related

Arduino vs Raspberry Pi: Which board should you buy for your next DIY project?

Don’t be fooled by their appearance — there’s a world of difference between the tiny Arduino and Raspberry Pi boards!

What do you need to program an Arduino board?

Unlike the Raspberry Pi or other SBCs, which can boot into any compatible OS image, the Arduino boards require an entirely different approach. Since these systems aren’t equipped with SD card slots, there’s no way to install an operating system for the Arduino family. Instead, you’ll need to connect the boards to a PC and upload codes written in C++ to the microcontroller with the help of the Arduino IDE.

This makes a USB cable a necessity when setting up your Arduino. We’ll be using an Arduino Uno that uses a USB Type-B port, which is the same as the one on Arduino Mega. Meanwhile, Leonardo, Due, Nano, MKR, and other small-sized boards possess a mini-USB socket, and you can go through the list of Arduino boards on the official website to identify the specific cable you’ll need for your microcontroller.

  • Arduino Uno REV3

    Arduino Uno REV3

  • “” data-modal-id=”single-image-modal” data-modal-container-id=”single-image-modal-container” data-img-caption=””””>

    A transparent render of the Amazon Basics USB-A to USB-B 2.0 Cable

    Amazon Basics USB-A to USB-B 2.0 Cable

How to set up an Arduino board using your PC?

Once you’ve purchased the USB cable compatible with your Arduino, you’ll need to configure the official IDE to interface the microcontroller with your PC. To do so,

  1. Grab the latest version of the Arduino IDE from this link, and unzip the folder once it has finished downloading.
  2. Run the Arduino IDE.exe file as an administrator.
  3. Click on Allow access if Windows Firewall prevents the IDE from accessing your private network.
    The Allow Access button in Windows Firewall

  4. Choose Install when Windows Security prompts you to install the Arduino USB driver.
    The Windows Security pop-up that appears when installing the drivers for the Arduino IDE

  5. While the Arduino IDE installs the necessary packages on your PC, plug one end of the USB cable into your PC and the other into the USB Type-B/micro-USB port of your Arduino board.
    A USB Type-B cable plugged in the Arduino Uno board

  6. Switch to your PC and click on the Tools header inside the Arduino IDE.
  7. Hover your cursor over Boardsthen Arduino AVR Boardsand select your Arduino model from the list.
    The procedure to select the board inside the Arduino IDE

  8. Once again, click on Toolshover your cursor over Port, and choose the serial COM port that shows up.
    The procedure to select the Serial Port in the Arduino IDE

Although optional, I suggest running the Blink script that’s included in the IDE to confirm whether the Arduino is connected to your PC.

  1. Click on Filenavigate to the Basics tab within Examplesand click on Blink.
    The procedure to open the Blink project in the Arduino IDE

  2. Press the Upload button inside the new IDE window.
    The Upload button highlighted in the Arduino IDE

  3. You’ll know the connection was successful when the IDE displays the Upload Successful message and one of the built-in LEDs on your Arduino starts blinking.

Turning the low-power Arduino into a DIY marvel with the power of coding

A person holding an Arduino Uno

With that, you’re free to build, compile, and upload all your code to the Arduino. The Arduino boards possess some memory of their own, so once you’ve uploaded your program to the microcontroller, you can disconnect it from your PC and the Arduino will run the code the moment you plug it into another suitable power supply.

But if you’re just browsing for some easy projects that don’t require a lot of coding or circuitry usage, then you might want to hold off on using the Arduino. There’s quite a lot of overlap between SBC and microcontroller projects, so it might be a good idea to kick off your tinkering journey with a Raspberry Pi instead.

Milk-V-Duo-S-2

Related

8 simple projects you can build with any SBC

Who says you need a Raspberry Pi to build your next DIY project?

Partager cet article

Inscrivez-vous à notre newsletter