Arduino 101: The What, Why, and How of Arduino Projects

Introduction

If you’ve ever wanted to learn more about Arduino and if creating an Arduino project will meet your (or your kids’) educational or career goals, then this guide is for you. We’ll cover the what, why, and how of Arduino programming and Arduino project building. By the end, you should have a good understanding of what Arduino is, how it works, why it’s important to learn, and how to get started today.

What is Arduino

First things first: what do we mean when we say “Arduino”? Is it an adjective? A piece of hardware? Some type of programming language?

Really, it’s all of the above and more!

Arduino as a term refers to Arduino microcontrollers developed by students and staff at Interaction Design Institute Ivrea, the Arduino language built off of Hernando Barragán’s “Wiring” language, the Arduino Integrated Development Environment (IDE) based off “Processing”, AND the company in charge of Arduino microcontrollers and the Arduino trademark (1,2,3). For the purposes of this article, we’re going to use “Arduino” to refer to the Arduino ecosystem: board, IDE, and language.

According to the Arduino team, “Arduino is an open-source electronics platform based on easy-to-use hardware and software” (11). Arduino was created out of the need to have an inexpensive and approachable way for non-developers to create projects using microcontrollers. Microcontrollers are tiny computers with an integrated circuit. They’re often used in embedded medical devices, for example, where embedding a single contained unit is desirable (7). Arduino microcontrollers let students design projects without having to have a lot of hardware or software, or spend a lot of time setting it up. With Arduino, creating your project is much more plug-and-play than ever before.

How Arduino Works

You may be wondering, “How does Arduino work?” We have the answer!

First, you set up your development environment (IDE) and write some code in what is called a “sketch”. The code you’ll write is in an Arduino-specific language that is human-friendly.

Here’s an example of what that human-friendly code looks like in Codebender:

Then, you tell the IDE to compile the program. (Here, by clicking, “Run on Arduino”.)

The “compile” process transforms your human-readable sketch into something the machine - in this case, the microcontroller - can read. (Computer language uses a sequence of 1’s and 0’s to work.)

The IDE has to translate the code into something the Arduino board can understand, and it uses what we call a “library” to do it. A library for Arduino is a bit like a dictionary. It tells the compiler where all the circuits are and what commands the board needs. Which is why you can only use boards, sensors, and accessories which has a library available and loaded into your IDE. (Codebender features over 609 built-in libraries!)

The result of the compilation is a file which contains all the 1’s and 0’s your Arduino project needs to work. This file gets uploaded to your board through USB.

Of course, you’ll also need to wire the board to any sensors, batteries, gears, motors, or other accessories required to make the project work. The possibilities are almost endless with Arduino!

(Want to learn more? Read “The Magic of Uploading Sketches, Explained”)

Why Create an Arduino Project

If all of this sounds overwhelming, you may be tempted to say, “Why bother with Arduino?” There are some good reasons to power through it and master Arduino programming and project building. Here are a few really good reasons why we think you should give Arduino a shot.

Reason 1: You Can Create Something “Real”

Unlike Scratch programming, where you create something digital that can’t be shown off, an Arduino project is a real-world project. Depending on how you build it, you can embed it into your home, show it off to friends, or even take it to school for show and tell. It’s a “real world” project with real-world applications.

Reason 2: It’s Inexpensive.

You can get started with Arduino very cheaply. All it takes is an IDE, an Arduino board, some accessories, and a few tools. And with browser-based IDEs like Codebender, you don’t even need an expensive computer to start coding. In many cases, if you already have access to a browser you can get started for less than \$50.

Reason 3: It’s Hands-On

Not everyone learns by reading a book or watching a video. If that’s you, take heart! Arduino is the perfect project for you to get your hands dirty and get a feel for programming.

Reason 4: You’ll Learn Computer Science Basics (Hardware, Software, Compilers, Design)

Arduino projects help you learn computer science basics. According to the Bureau of Labor Statistics (5,9), jobs requiring computer science skills are expected to increase by 52% between 2010 and 2020… and likely much more beyond. With Arduino, you get the opportunity to learn computer science in a way that’s fun and approachable. You’ll learn basic hardware, software, and even programming. All by using a tiny microcontroller that’s smaller than the size of a deck of cards!

Reason 5: Create Test Project to Add to Your Portfolio

Another reason to try Arduino is that it creates a great test project to add to your portfolio. Whether your goal is to gain entrance into a competitive engineering school, land that IT job, of simply differentiate yourself from your peers, then Arduino is a great place to start. And the troubleshooting skills you’ll learn will help you even if you don’t go into a STEM field.

Reason 6: It’s Fun!

Finally, it’s just plain fun. Where else can you make a robot that obeys your commands, build sensors for your home, or create unique robotic gifts? Arduino is only limited by your imagination.

Where to Find Example Arduino Projects

If you’re new to Arduino, figuring out where to start can feel overwhelming. Almost every project seems too difficult to begin. Thankfully, you don’t have to come up with it all on your own. There are many places where you can find Arduino projects appropriate to your skill level and interests.

Hackster.io

Hackster.io is a site for hardware engineers and aspiring makers. You’ll find helpful blog posts and sample projects for a number of platforms including Arduino, Raspberry Pi, Android, Teensy, IFTTT, Sparkfun, Twilio, and more. Click to head there now.

Instructables

Another great resource is Instructables, where you’ll find project walkthroughs for Arduino, Raspberry Pi, and more. To find Arduino projects, head to https://www.instructables.com/id/Arduino-Projects/.

Arduino Project Hub

Another option is the Arduino Project Hub at Arduino.cc. Sort by Arduino project, category, difficulty, and project explanation type. To view them all, head to https://create.arduino.cc/projecthub.

Arduino Forum

Sometimes, Arduino makers post their tutorials on the forum to share with newbies. Here’s an example of one that was posted: https://rudysarduinoprojects.wordpress.com/2018/12/30/fun-with-arduino-uno-01-getting-started-in-6-easy-steps/

You can find more at https://forum.arduino.cc/index.php?board=118.0.

Codebender

Of course, you can also find projects at Codebender.cc! We have example projects on the blog as well as inside the code library. Click here to try Codebender free for 30 days.

How to Get Started with Arduino

Ready to get started with Arduino? Here’s what you’ll need to get started.

Electronics Skills

One thing you’ll notice if you peruse some Arduino projects is that you’ll need to know some basics about electronics, namely circuits. Remember that microcontrollers are essentially “small computers on a single integrated circuit” (7), and we’re programming those circuits to do things like turn lights on and off, display text, or read a sensor. To learn more about circuits, watch this training track from Kahn Academy.

Arduino Boards

Of course, you’ll also need an Arduino board. There are many on the market to choose from, such as Arduino Uno, Arduino Nano, Arduino Dueminalove, Arduino Diecimela, Arduino Extreme, Arduino USB, and Cytron’s “Maker Uno”. There are dozens of other boards available as well. Non-Arduino boards are either based off the original but with slight modifications (like the Maker Uno), a generic copy, or counterfeit. For ease of use, we recommend purchasing something like the Arduino Uno or the Maker Uno for ease of use.

Arduino Kits

One way to easily get your feet wet is to purchase a pre-made kit. Kits usually come with the board, accessories and hardware, and instructions in a single package. That way, you don’t need to worry if they pieces work - they’ll just work! You can find kits most easily on Amazon.

Arduino Programming Language

The next thing you’ll need to know is the Arduino programming language. While your kit or project instructions should include the code you can type into the IDE, it helps to know what the commands and variables you’re typing in signify. For that, you can check out the docs on Arduino.cc: https://www.arduino.cc/reference/en/.

Here are some common functions you’ll use in Arduino projects:

analogRead(pin)

This function reads the value from the specified pin. The parameters you specify is the pin, and this function returns that pin’s analog reading in the form of the INT data type. Documentation

analogWrite(pin, value)

This function writes an analog value to the specified pin until the next analogWrite or analogRead call is received. This function has two parameters: the pin you write to and the value. Documentation

digitalRead(pin)

This function reads the value from a specified pin. This function returns either HIGH or LOW. Documentation

digitalWrite(pin, value)

This function writes a value (HIGH or LOW) to a specified pin. Note you must specify INPUT or OUTPUT for the pin (using pinMode), as this setting changes the digitalWrite behavior. Documentation

pinMode(pin, mode)

This function configures a specified digital pin to be INPUT, OUTPUT, or INPUT_PULLUP. Documentation

Arduino IDEs

No discussion of Arduino would be complete without also talking about the IDEs available. As mentioned previously, as IDE is an “integrated development environment”, and it’s where you’ll type in code to compile and run on your Arduino microcontroller.

Here at Codebender, we offer three separate IDEs to test your Codebender projects on:

Codebender IDE

The core Codebender IDE can be tried for free at Codebender.cc. Our IDE works in Google Chrome as a plugin, but can also be downloaded onto your computer and works on Windows, Mac, and Linux operating systems.

Codebender BLOCKS

Codebender Blocks is an IDE built using a graphical interface like “Scratch”, which lets people drag and drop commands into the IDE rather than typing out code. That way, they're not left scratching their heads over programming. This version, like EDU, is “classroom ready”.

Codebender EDU

This version is designed for classrooms and lets teachers share a single classroom link with students, rather than requiring individual subscriptions for each student.

Arduino Education

Finally, maybe you want to follow along with an Arduino resource, instead of trying to figure it out yourself. Here are some you might find helpful.

Books

Amazon.com lists many books about Arduino. Here are some of the better Arduino guides available.

Courses

Many people offer free and subscription-based Arduino courses. Udemy has several listed on https://www.udemy.com/topic/arduino/. And then there’s this free “Arduino Crash Course” available at https://programmingelectronics.com/arduino-crash-course/ and another at “Random Nerd Tutorials”: https://randomnerdtutorials.com/arduino-mini-course/.

Local Meetups

Finally, try seeing if there’s an Arduino or Maker meetup in your area where you can get in-person help with your project. Here’s a handy link to start that search yourself: https://www.meetup.com/topics/arduino/

Where to Get Arduino Help

Need more help with Arduino? The official resource is the Arduino forum at https://forum.arduino.cc/. There you’ll find many experienced people who can help you out with any Arduino questions you may have. If you’re a Codebender customer, you can also submit a ticket via [email protected].

Sharing Your Projects

We’d LOVE to see the projects you’ve built using Codebender! Send us a writeup (or a YouTube video walkthrough) at [email protected] and we’ll feature your project on the site.

That’s it! Did we miss any resources? Found this helpful? Post in the comments below.

References and Further Reading

  1. https://processing.org/
  2. http://people.interactionivrea.org/h.barragan/thesis/thesis_low_res.pdf
  3. https://arduinohistory.github.io/
  4. https://www.arduino.cc/reference/en/
  5. http://www.exploringcs.org/
  6. https://www.arduino.cc/en/Guide/Introduction
  7. https://en.wikipedia.org/wiki/Microcontroller
  8. https://github.com/arduino/Arduino/wiki/Build-Process
  9. Bureau of Labor Statistics (BLS), Employment Projections 2010-2020
  10. https://www.circuito.io/blog/arduino-code/
  11. https://www.arduino.cc/en/Guide/Introduction