Understanding the Arduino Ecosystem
The Arduino platform is made up of a combination of microcontroller boards (hardware) and the Arduino IDE (Integrated Development Environment, software). There are countless variations on boards that have a wide range of capabilities. There are several official options for the code environment and several other platforms that support programming Arduinos.
In this course we will be using Arduino UNO microcontrollers and the latest version (2.x) of their desktop IDE.
Part 1 – Hardware :: What’s an Arduino ?
Microcontrollers are small computers designed to respond to and control connected circuits. These are distinct from microprocessors (the kind of computer chip inside your laptop of desktop). The microcontroller included in your kit is an Arduino Uno.
The Uno is a microcontroller chip (Atmega328) and some related hardware (USB, power regulation, breakout headers) all attached to a single board making it easy to use and program. The Uno is very popular in creative and maker communities. It is an excellent way to start exploring tangible.
Like all of our hardware components we need to be able to identify the device — or in this case it various hardware features, know if electrical limits and learn its representations.
Representation(s)
The Arduino symbol is complex, reflecting the sophistication of the device. We will come to understand all the parts over several weeks.
Arduino Power Limits
One must take care when powering the Arduino. It is a 5V max device. It can be very safely powered by USB — which is designed to provide 5V, 1A to connected devices.
When powered by your battery packs (9V) — the only safe way is to use your battery clip with the barrel jack.
Getting to know your Uno
Required Parts
- Arduino UNO
- USB cable
- Battery Clip with Barrel
Landmarks
The Uno has several features that you should take the time to get familiar with. They are highlighted in the image below.
Video :: Getting to kNow Your Arduino
Get the slides
Part 2 – Software :: What is the Arduino IDE?
The second component of the Arduino system is the programming environment or IDE.
Context of tangible Coding
Before we download and set up the Arduino environment, we should take a moment to think about how it relates to other code contexts you may have used in the past.
Different computer languages and platforms have been developed to solve different problems.
The problems we want to explore in this course revolve around themes of tangible computing: how can we build an experience that knows when people are present? How can I make that thing move? How can I built an object that responds changes in temperature?
All of these examples exist in the real world (not in a web browser or on a screen). The Arduino platform was developed to explore exactly these real world experiences.
Where is the code?
Arduino code is compiled and embedded. As a result, there are a few programming steps that you may not have experienced on other platforms. This is especially true if you are coming from a web (P5JS) background, or from P5JS’s parent platform Processing.
Like many other platforms you will write code in a glorified text editor. However, to make your code run you need to get it inside your Uno (microcontroller).
The first step in this process is compiling. Compiling is an automated process that takes the Arduino-language syntax that you typed and converts it into a machine readable format. Syntax error checking happens at this stage. So typos and language bugs will often be caught here.
Once compiled, the code is UPLOADED into the Uno. Uploading literally moves the compiled machine code from your programming computer into the chip on the Uno board. Once uploaded it runs automatically. You will solve semantic or experience errors and bugs at this stage.
Required Software
You can download the required free software from the Arduino site.
Arduino software is open source and donations are requested. But you can hit the <Just Download> button.
Here is a quick walk through of the process (2024).
Once you have the software downloaded and installed you should test your tool chain.
Comparing Arduino 1.x and 2.x
Make sure you get the latest Version 1.X desktop IDE for your platform (at time of writing this was 1.8.16). We will not be using the Web Editor or the Version 2.0 IDE — which is in Beta. (You are encouraged to check out the V2.0 IDE as it will be standard very soon, but i will teach from 1.X).
As of 2024 we will use Arduino IDE 2.x in our introductory class. This version is a fork of the VSCode environment, so if you have experience there you will see some similarities (and a few differences).
This means that moving forward, older videos use a different interface than the one we are using in class. Some things are in different places. At first you may find the translation between versions a bit overwhelming – but it should be quick to overcome.
To help in this transition, I have made a video which highlights the difference between V1.x and V2.x for board selection, port selection, serial monitor access and functioning, and serial plotter access. You may want to watch it now or later as you move through this introduction.
As mentioned in the video — this is a bit chicken and egg — seeing the comparison before you know the tasks. You may decided to come back to this video at various times through out the course.
GET to know the Arduino SOftware (IDE)
This video was made in 2020. The above video will help you figure out differences if you are unsure.
There is a section in this video (below) that shows you how to turn on line numbers and code folding — these are both enabled by default in the 2.x versions. So nothing to do there. On OSX you can’t turn them off anymore, I assume that is the same across platforms ( let me know if I am wrong, or if your platform is different).
Toolchain overview, Upload code, Blink an LED.
In this video near the end, there is a reference to an assignment called a Circuit Selfie. In 2024 these are now called ARTifacts … check D2L for specific course tasks, because these have changed since the pandemic years.
Checkout the Arduino language
The Arduino language is a subset of C and C++ with some hardware specific (contextual) additions. Take a few minutes to check it out. It has many structures that should be familiar.
Advanced Considerations
If you are new to all of this, feel free to ignore this paragraph.
If you have coded C or C++ or even C# for screen based contexts (apps, phones, gaming) you will notice some features are not available. Arduino Unos are a very basic, single threaded, 8-bit RISC architecture. They do not support screens or multitasking. There is also no math co-processor so INTs largely rule the day.
Going Further
There are thousands of pages and sites dedicated to learning Arduino. Google is your friend but there are caveats. A lot of information dates very quickly. Older posts are very likely no longer current. These may be great for background, but specifics often change. If you search instructables — and you absolutely should — note that info there is not fact checked — not all instructables are complete, nor do they always make sense or even come to the conclusion suggested by their titles. That said, I am learning new stuff there all the time.
The Arduino Getting Started page gives a great overview of all the available boards (when we first used Arduino in this course there was only one board!)
All the built in examples ( board specific) are well documented and could be places to dive in.
Check out the official Arduino Playground for loads of detailed information. It will go well beyond this course.
If you want to go beyond our kits Sparkfun has lots of Arduino info. BUT BE AWARE that they are US based so buying directly comes with border broker and currency costs. Perhaps use this link for info only and check out some buying tips here before ordering form the states.
Contents
- 1 Understanding the Arduino Ecosystem
- 2 Part 1 – Hardware :: What’s an Arduino ?
- 3 Representation(s)
- 4 Arduino Power Limits
- 5 Getting to know your Uno
- 6 Part 2 – Software :: What is the Arduino IDE?
- 7 Required Software
- 8 Toolchain overview, Upload code, Blink an LED.
- 9 Checkout the Arduino language
- 10 Going Further