Arduino: What is it? What can it do?

Similar documents
Introduction to Microprocessors: Arduino

Arduino: Serial Monitor Diagrams & Code Brown County Library

ARDUINO BOARD LINE UP

Arduino: RGB LEDs Diagrams & Code Brown County Library

Lesson 5 Arduino Prototype Development Platforms. Chapter-8 L05: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Introduction to Arduino

Farklı Arduino Boardlar

Getting to know the Arduino IDE

IDUINO for maker s life. User Manual. For IDUINO development Board.

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

keyestudio Keyestudio MEGA 2560 R3 Board

IDUINO for maker s life. User Manual. For IDUINO Mega2560 Board(ST1026)

ARDUINO MEGA 2560 REV3 Code: A000067

USER MANUAL ARDUINO I/O EXPANSION SHIELD

Introduction to Arduino. Wilson Wingston Sharon

RGB LED Strip Driver Shield SKU:DFR0274

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

ARDUINO YÚN Code: A000008

ARDUINO MEGA INTRODUCTION

Arduino Uno Microcontroller Overview

OBSTACLE AVOIDANCE ROBOT

Introduction to Microcontrollers

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

ARDUINO INDUSTRIAL 1 01 Code: A000126

ARDUINO MEGA ADK REV3 Code: A000069

w w w. b a s e t r a i n i n g i n s t i t u t e. c o

ARDUINO YÚN MINI Code: A000108

Introduction to Arduino

More Arduino Programming

Arduino Part 2. Introductory Medical Device Prototyping

Alessandra de Vitis. Arduino

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

Electronics Single Board Computers

Sanguino TSB. Introduction: Features:

ARDUINO LEONARDO ETH Code: A000022

Arduino Platform Part I

Arduino Prof. Dr. Magdy M. Abdelhameed

Arduino ADK Rev.3 Board A000069

ARDUINO UNO REV3 Code: A000066

Arduino Smart Robot Car Kit User Guide

DFRduino M0 Mainboard (Arduino Compatible) SKU: DFR0392

Bluno Mega 2560 (SKU:DFR0323)

Laboratory 1 Introduction to the Arduino boards

SIDruino Author: Ciprian Sufitchi, N2YO

Seeeduino LoRaWAN. Description

Arduino Uno. Power & Interface. Arduino Part 1. Introductory Medical Device Prototyping. Digital I/O Pins. Reset Button. USB Interface.

Interesting Items Volume 16. Dave Jaffe 04/23/2011

MegaPi Born to Motion Control

Atmel Microprocessor Programming With AVRISPmkii

ExpLoRer Starter Kit User Guide

ARDUINO MICRO WITHOUT HEADERS Code: A000093

ARDUINO MINI 05 Code: A000087

ARDUINO LEONARDO WITH HEADERS Code: A000057

Arduino Course. Technology Will Save Us - Tim Brooke 10th August Friday, 9 August 13

SECOND EDITION. Arduino Cookbook. Michael Margolis O'REILLY- Tokyo. Farnham Koln Sebastopol. Cambridge. Beijing

Rephone Core 2G-AtmelSAMD21

Computer Architectures

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

Goal: We want to build an autonomous vehicle (robot)

How to Use an Arduino

Station Automation --W3SZ

TANGIBLE MEDIA & PHYSICAL COMPUTING INTRODUCTION TO ARDUINO

What s inside the kit

Smart Restaurant Menu Ordering System

The Arduino Briefing. The Arduino Briefing

ARDUINO M0 PRO Code: A000111

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

IoE Workshop. Marc Khayat, CCIE #41288, Leonard Janer Technical Managers. June 16

Distributed Real-Time Control Systems. Module 3 Hardware for Real Time Distributed Control Systems

ESPino - Specifications

micro:bit Lesson 2. Controlling LEDs on Breadboard

Chapter 2: Introducing the mbed tw rev

Beetle SKU:DFR0282. Contents. Introduction

Intel Galileo gen 2 Board

Lesson 6 Intel Galileo and Edison Prototype Development Platforms. Chapter-8 L06: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

DESERT CODE CAMP

Arduino Dock 2. The Hardware

IME-100 Interdisciplinary Design and Manufacturing

COL862 - Low Power Computing

GSM Shield SIM900. Get Starting

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

<Table of content> <Parts and description> <Circuit board Guide> <Pins> <Basics of Coding> <Intro to Arduino> <Intro> <Downloading Arduino IDO>

Distributed Real- Time Control Systems

Freeduino USB 1.0. Arduino Compatible Development Board Starter Guide. 1. Overview

Overview of Architectures with Arduino Boards as Building Blocks for Data Acquisition and Control Systems

IOT HARDWARE SUBSTRUCTURE

ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL

CNC Shield Guide V

THE COMPLETE ALL IN ONE ROBOT 360 NANO BOT

LAMPIRAN I (LISTING PROGRAM)

Arduinos without (much) programming

Adaptive Motion Control of FIREBIRD V Robot

TA0297 WEMOS D1 R2 WIFI ARDUINO DEVELOPMENT BOARD ESP8266

Arduino Cookbook O'REILLY* Michael Margolis. Tokyo. Cambridge. Beijing. Farnham Koln Sebastopol

ArduCAM CC3200 UNO board

FRDM-KL03Z User s Guide

Adapted from a lab originally written by Simon Hastings and Bill Ashmanskas

International Journal of Advance Research in Engineering, Science & Technology

3 Wire LED Module (SKU:DFR0090)

Arduino Internals. Dale Wheat. Apress

Transcription:

Arduino: What can it do? tswsl1989@sucs.org May 20, 2013

What is an Arduino? According to Arduino: Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It s an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board. According to Wikipedia: Arduino is a single-board microcontroller designed to make the process of using electronics in multidisciplinary projects more accessible.

What is an Arduino? Open Source Reference designs for hardware Firmware tools + GUI Mostly based around 8-bit Atmel AVR chips There is also a variant based on an ARM Cortex-M3 Several official varieties with different chips, extra functionality, different shapes and sizes

Arduino Arduino Uno ATmega328 14 Digital I/O Pins (6 can do PWM) 6 Analog Input Pins 32 KB Flash Memory, 2 KB SRAM, 1 KB EEPROM 16 MHz Clock

Arduino Arduino Mega2560 ATmega2560 54 Digital I/O Pins (15 can do PWM) 16 Analog Input Pins 256 KB Flash Memory, 8 KB SRAM, 4 KB EEPROM 16 MHz Clock

LilyPad Arduino ATmega168V or ATmega328V 14 Digital I/O Pins (6 can do PWM) 6 Analog Input Pins 16 KB Flash Memory, 1 KB SRAM, 512 bytes EEPROM 8 MHz Clock Thin, probably washable

Arduino Esplora ATmega32u4 Lots of onboard stuff: Analog joystick + button, D-pad 3-axis linear accelerometer Linear potentiometer TinkerKit connectors Headers designed to connect to a TFT module available from Arduino Can present itself as a serial device, or as keyboard/mouse

Arduino Due AT91SAM3X8E (ARM Cortex-M3) 54 Digital I/O Pins (12 can do PWM) 12 Analog Input Pins, 2 Analog Output pins 512 KB Flash Memory, 96 KB SRAM 84 MHz Clock

Arduino Extension boards that stack on top of other Arduino boards Only works for the rectangular boards: Uno, Mega, Due etc. Add extra hardware that communicates with the Arduino using some of the existing I/O pins Pins not used by the shield are typically passed through Allows connections to other components using the uppermost board of the stack.

Arduino Ethernet/WiFi/XBee + SD Card shields SD card for file transfers Ethernet + WiFi libraries support TCP and UDP and will do DNS lookups Libraries provide support for acting as a server Motor shield Separate power supply PWM speed control Can brake motors rather than free-wheeling when speed reduced Motor current can be read by Arduino GSM shield Supports voice, data + SMS Controlled with AT Commands Replaceable SIM card

Arduino devices Programs (Sketches) written in C or C++ Require two functions: setup() and loop() setup() is run once when the board is reset loop() is (as the name suggests) run repeatedly In other words, the bootloader runs this: void main() { setup(); do { loop(); } while(1); }

Language features Usual C style flow control and variable types: if, for, while, do, switch, goto int, int, char, long, short, float, double Simple arrays - int foo[5] char foo[10] style strings Also supports String objects Comments (Not sure what these are) Lots of features provided by library code Can just use C/C++, with some caveats No libstdc++, no new or delete...

Blink an LED at 1Hz: A simple example int led = 13; // Most boards have an LED on pin 13 void setup() { pinmode(led, OUTPUT); } void loop() { digitalwrite(led, HIGH); delay(1000); digitalwrite(led, LOW); delay(1000); } // turn the LED on // wait for a second // turn the LED off // wait for a second

Serial communication /* Reading a serial ASCII-encoded string. Circuit: * Common anode * Red cathode: digital pin 3 * Green cathode: digital pin 5 * blue cathode: digital pin 6 * anode: +5V created 13 Apr 2012 by Tom Igoe This example code is in the public domain. */ const int redpin = 3; const int greenpin = 5; const int bluepin = 6; void setup() { Serial.begin(9600); pinmode(redpin, OUTPUT); pinmode(greenpin, OUTPUT); pinmode(bluepin, OUTPUT); } void loop() { while (Serial.available() > 0) { int red = Serial.parseInt(); int green = Serial.parseInt(); int blue = Serial.parseInt(); if (Serial.read() == \n ) { red = 255 - constrain(red, 0, 255); green = 255 - constrain(green, 0, 255); blue = 255 - constrain(blue, 0, 255); analogwrite(redpin, red); analogwrite(greenpin, green); analogwrite(bluepin, blue); Serial.print(red, HEX); Serial.print(green, HEX); Serial.println(blue, HEX); } } }

What are people doing with Arduino? Lots of examples listed at http://playground.arduino.cc GardenBot: Open source garden monitoring system http://gardenbot.org/ OpenEnergyMonitor: Modular power monitoring system http://openenergymonitor.org/emon/ Beer bottle opener: Uses an Arduino to control a 2.8hp two stroke engine to open swing top bottles https://www.youtube.com/watch?v=0yrnya6z410 ArduPlane/ArduCopter: Fixed-wing and rotary-wing UAVs http://www.ardupilot.co.uk/

Much of the material for this talk was stolen/reused from: http://arduino.cc/ In particular, http://arduino.cc/en/guide/ https://en.wikipedia.org/wiki/arduino Slides will be available at http://sucs.org/~tswsl1989/talks/

Thanks for listening Any questions?