# Arduino

## Summary


Working with electronics and programming microcontroller-based systems is generally a difficult task that's reserved for engineers. What if we could simplify the process so that more people can participate, including designers and artists? This is why Arduino was invented back in 2005.

Arduino is an open source platform of both software and hardware. It uses a simplified programming syntax based on C/C++ languages. Arduino boards can be easily programmed by anyone with a computer and a USB connection. 

Arduino boards come in many variants and developers get to choose what suits their application. The ecosystem around Arduino is rich with many third-party libraries, derivative boards, modules and shields. Indeed, Arduino has been a catalyst to the Maker Movement.

## Discussion

### What can I build with an Arduino?

Arduino is a simple low-cost platform to get started with DIY projects involving basic electronics and software. It's can be used to prototype applications involving sensors and motors for the Internet-of-Things (IoT). This means an Arduino can not only interface with real-world objects but also collect data and send them via the Internet to cloud applications.

You can use Arduino to automate routine tasks in your home such as watering plants or opening doors for your pets. You can build simple gadgets such as an LED matrix clock or a digital lock box. For learning purpose, you can build a traffic light system. More useful applications include fall detection for the elderly and ultrasonic glasses for the blind. You can also use Arduino as a substitute for more expensive engineering tools such as an audio meter or an oscilloscope. Among the simplest projects is to monitor and record temperature, humidity or pollution.  


### What are the licensing terms for Arduino?

Arduino adopts the principles of open source for both hardware and software. For the hardware, the original design files (Eagle CAD) are available under CC BY-SA licensing. This allows for derivatives and commercial use but requires that attribution be given to Arduino. Derived works must also be released as CC BY-SA. 

There's also an IDE to program the hardware, which uses GPL license. Code is in Java and available on GitHub. C/C++ microcontroller libraries use Lesser GPL license. 

You can use the Arduino logo in tutorials, websites and community channels where the content is Arduino specific. However, if you release your own design, you should not use either the name or the logo. You can however say "XXX for Arduino" or "XXX (Arduino-Compatible)". 

Despite these licensing terms, there are *counterfeits* that violate Arduino trademarks. There are also *clones* that are replicas of original designs but are branded differently. Finally, there are *derivatives* that innovate on the original design and therefore add value to the Arduino ecosystem. Examples include Teensy and Flora. 


### How do I power up an Arduino?

There's more than one way to power an Arduino Uno: USB port, DC power jack, or header pins. Give power via VIN header pin for standalone battery-powered applications. To power peripherals, 5V and 3.3V outputs are available. 

Most Arduino variants run on 5V. Due, M0 and Yun Mini are some boards that use 3.3V. Voltage input range is 9-12V for the Uno via the DC jack; 7-12V for Leonardo, Micro and Yun Mini; 5-12V for Mega 2560 R3; 5-7V for Mini. Note that smaller boards (Nano, Micro, Mini) lack DC power jack. 

USB is also the interface to program the board. While Uno has USB A-B type, Nano has mini-B USB. Leonardo, Micro, and Due are some variants that use micro USB. 


### Could you explain the different memories on an Arduino?

The following are the different Arduino memories: 

    + **Flash**: Used to store the program. Arduino programs are called *sketches*. They're saved as `*.ino` files during development.
    + **SRAM**: Temporary storage for variables during program execution. Contents are lost when board is powered off.
    + **EEPROM**: Used for long-term storage. Most boards have EEPROM but Due and M0 don't have this.
    + **ROM**: Read-only memory for storing bootloader. Programmed in factory. Available only on some boards such as Due.

### What hardware interfaces are available on an Arduino?

Arduino has many interfaces, often shared on the same physical pin. A pin can be used for only one function at a time. Among the interfaces are: 

    + **General Purpose Input Output (GPIO)**: For digital IO. Useful for interfacing to button switches, LEDs, etc.
    + **Pulse Width Modulation (PWM)**: Mimics analogue output using digital pulses. Useful for controlling motors, fading LEDs, etc.
    + **Analogue Input**: Uses a 10-bit *Analogue-to-Digital Converter (ADC)* to bring analogue signal values into the digital world. Used to read from an analogue sensor.
    + **USART**: For serial communications. Used to send/receive data to/from laptop, Bluetooth device, etc. LEDs Tx and Rx help us see serial activity.
    + **Digital Interfaces**: Other interfaces include *I2C* and *SPI*. Used for interfacing to digital sensors or other peripherals such a memory, display, etc.

### What are the different Arduino hardware variants?

The official Arduino product page lists all the variants. Arduino hardware comes in three main types: 

    + **Boards**: These offer the main functionality. Among the entry level **boards** are Uno, Leonardo, Micro, and Nano. Boards with more features or better performance include Mega 2560, Zero, Due, and M0 Pro. For the Internet of Things (IoT), we need connectivity to the internet. Some boards that offer this include Yun, Ethernet and Industrial 101. For wearable applications, the Lilypad series offer small form factor boards that can sewn to cloth.
    + **Modules**: These are small form factor boards. Modules giving IoT connectivity include Fox 1200, WAN 1300, GSM 1400, NB 1500, and WiFi 1010.
    + **Shields**: These extend the hardware features provided by boards. They can't be used on their own. They connect to boards via well-defined interfaces. There are shields for interfacing via USB, CAN, RS485, and more.

### How do I select an Arduino hardware for my application?

You should start by listing application requirements in terms of performance, memory, connectivity, and interfaces. 

The most popular one is the Arduino Uno. Many shields are made compatible to the pin header of the Uno. To fit into tight spaces, Arduino Nano or Mini are cheaper and better options; but shields can't be used with them. 

For USB apps, prefer Leonardo or Micro that are based on ATmega32U4. 

Arduino Due has an ARM Cortex-M3 running at faster clock, with more memory and interfaces than the Uno. It runs on 3.3V, not 5V like the Uno. Standard Arduino shields can be used. Arduino Mega has similar form factor to the Due but uses ATmega2560, not an ARM processor. It runs on 5V and therefore friendly to hobbyists. 

Any project needing lots of GPIO can use Due or Mega. If fast processing is needed, Due is a better choice. Due is also good for analogue, with 12 inputs and 2 outputs. 

More information is available at Core Electronics and Hackster.

## Milestones

2001

At the MIT Media Lab, Casey Reas and Ben Fry invent **Processing** based on Java. Processing is a graphical library and an IDE. It simplifies programming syntax. Later, Processing goes on to inspire other projects such as Wiring, Arduino and Fritzing. 

2003

Hernando Barragán creates **Wiring** platform so that designers and artists can approach electronics and programming more easily. Wiring itself is based on Processing. It's part of Barragán's Master's thesis project at the Interaction Design Institute Ivrea (IDII) in Italy. In March 2004, 25 Wiring PCBs are manufactured and hand-soldered. 

2005

While the Wiring boards used ATmega128, researchers at IDII fork Wiring code and add support for the cheaper ATmega8. They name the fork **Arduino**. The first batch of Arduino boards are also made the same year. 

Sep  
2010

**Arduino Uno** is released based on ATmega328P. Clock is at 16MHz. Memory includes 32KB Flash, 2KB RAM and 1KB EEPROM. Unlike the first Arduino of 2005 that used RS232, Uno uses USB host interface and FTDI chip. 

2012

**Arduino Due** is released. This is the first 32-bit Arduino. 

Mar  
2014

The first **Arduino Day** happens on 29th March. This day now marks an annual event worldwide for people to share knowledge and exhibit their Arduino projects.

May  
2015

At the Maker Faire Bay Area, Massimo Banzi announces the creation of **Genuino**. Due to trademark issues and legal disputes, Arduino trademark will be limited to the U.S., for which Adafruit will be the manufacturer. In other markets, Genuino trademark will be used with manufacturing outside the U.S. In October 2016, differences are put aside and the companies behind Arduino and Genuino announce a merger. 

2016

To enable code editing and programming boards from a web browser, **Arduino Create** is released. 

2017

In January, to take care of manufacturing, **Arduino AG** is incorporated. Later the same year, there's talk of forming **Arduino Foundation** for maintaining the IDE and other code infrastructure in an open source community-driven manner. Subsequently, not much information has been released about the Foundation. 

Apr  
2018

To cater for IoT applications, Arduino announces the **MKR Family** of boards. Most of these boards come with built-in wireless connectivity; or they're of smaller form factor. Connectivity could be GSM, SigFox, or Wi-Fi. In May, new boards supporting NB-IoT and Bluetooth are introduced.