Introduction to Arduino



Similar documents
Theory and Practice of Tangible User Interfaces. Thursday Week 2: Digital Input and Output. week. Digital Input and Output. RGB LEDs fade with PWM

IR Communication a learn.sparkfun.com tutorial

Controlling a Dot Matrix LED Display with a Microcontroller

User Guide Reflow Toaster Oven Controller

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

CAN-Bus Shield Hookup Guide

Animated Lighting Software Overview

Surveillance System Using Wireless Sensor Networks

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

NEULOG HEART RATE AND PULSE LOGGER SENSOR GUIDE

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

Microcontroller Programming Beginning with Arduino. Charlie Mooney

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

ABACOM - netpio.

C4DI Arduino tutorial 4 Things beginning with the letter i

Lab Experiment 1: The LPC 2148 Education Board

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

Special Lecture. Basic Stamp 2 Programming. (Presented on popular demand)

Introduction to Arduino

Modern Robotics, Inc Core Device Discovery Utility. Modern Robotics Inc, 2015

K-Type Thermocouple Sensor User s Guide

Arduino Lesson 0. Getting Started

Getting started with the O Watch

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Intro to Intel Galileo - IoT Apps GERARDO CARMONA

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

Arduino Lab 1 - The Voltage Divider

Basic Pulse Width Modulation

INTRODUCTION TO SERIAL ARM

An Introduction to MPLAB Integrated Development Environment

PRODUCTIVITY THROUGH INNOVATION 600 CONTROL DIRECT DRIVE TECHNICAL/OPERATION MANUAL

MANUAL FOR RX700 LR and NR

iloq P10S.10/20 Programming device User's Guide

Six-servo Robot Arm. DAGU Hi-Tech Electronic Co., LTD Six-servo Robot Arm

Wireless In-Ear Audio Monitor

Table of Contents. Use. Troubleshooting. Setup. Welcome. 11 How to arm/disarm system/camera(s) 19 Sync Module setup issues. 3 Installing the Blink app

Application/Connection Examples

Creating a Project with PSoC Designer

TRILOGI 5.3 PLC Ladder Diagram Programmer and Simulator. A tutorial prepared for IE 575 by Dr. T.C. Chang. Use On-Line Help

Electronics 5: Arduino, PWM, Mosfetts and Motors

EVAL-UFDC-1/UFDC-1M-16

Measuring, Controlling and Regulating with labworldsoft

RGB LED Strips. Created by lady ada. Last updated on :00:18 PM EST

Lab 1: Introduction to Xilinx ISE Tutorial

Scilab Arduino Blinking LED Tutorial

INSTRUCTION MANUAL All-In-One GSM Home Alarm System SB-SP7200-GSM

Work with Arduino Hardware

STEP 7 MICRO/WIN TUTORIAL. Step-1: How to open Step 7 Micro/WIN

MCP4725 Digital to Analog Converter Hookup Guide

Arduino Lesson 4. Eight LEDs and a Shift Register

CHAPTER 11: Flip Flops

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

EXPERIMENT 2 TRAFFIC LIGHT CONTROL SYSTEM FOR AN INTERSECTION USING S7-300 PLC

Lab 1 Course Guideline and Review

Using The PIC I/O Ports

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Character LCDs. Created by Ladyada. Last updated on :45:29 PM EDT

3.2 inch QVGA TFT Color LCD User s Guide Version 1 & 2

Your Multimeter. The Arduino Uno 10/1/2012. Using Your Arduino, Breadboard and Multimeter. EAS 199A Fall Work in teams of two!

0832 Dot Matrix Green Display Information Board User s Guide

Hands On ECG. Sean Hubber and Crystal Lu

The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications

ETEC Digital Controls PIC Lab 10 Pulse Width Modulation

The Clavinova-Computer Connection

IGSS. Interactive Graphical SCADA System. Quick Start Guide

The $25 Son of a cheap timer This is not suitable for a beginner. You must have soldering skills in order to build this kit.

Arduino project. Arduino board. Serial transmission

Once you have obtained a username and password you must open one of the compatible web browsers and go to the following address to begin:

Lab 6 Introduction to Serial and Wireless Communication

Flight Controller. Mini Fun Fly

SMS Alarm Messenger. Setup Software Guide. SMSPro_Setup. Revision [Version 2.2]

PM1122 INT DIGITAL INTERFACE REMOTE

POINTS POSITION INDICATOR PPI4

User and installation manual

Pulse Width Modulation (PWM) LED Dimmer Circuit. Using a 555 Timer Chip

Audio-Technica AT-LP60-USB, AT-LP120-USB, AT-LP240-USB & AT-LP1240-USB Turntables. Software Guide

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

ezsystem elab16m Project 1F: Alarm System (Full Project description)

PolyBot Board. User's Guide V1.11 9/20/08

Downloading <Jumping PRO> from Page 2

Tutorial for MPLAB Starter Kit for PIC18F

Using the T&D Thermo App with TR-7wf Data Loggers

Servo Motors (SensorDAQ only) Evaluation copy. Vernier Digital Control Unit (DCU) LabQuest or LabPro power supply

4/Really Getting Started with Arduino

Chapter I Model801, Model802 Functions and Features

WinLIN Setup and Operation:

Pocket Verifier Quick Start HTC Touch Diamond

Smarthome SELECT Bluetooth Wireless Stereo Audio Receiver and Amplifier INTRODUCTION

TPG MOBILE BROADBAND QUICK SETUP GUIDE

AVR Butterfly Training. Atmel Norway, AVR Applications Group

How to read this guide

Greetings Keyboard Mastery Keyboarding Students! Teacher: Mrs. Wright

Timer A (0 and 1) and PWM EE3376

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

8 by 8 dot matrix LED displays with Cascadable Serial driver B32CDM8 B48CDM8 B64CDM8 General Description

Technical Specifications: The specifications represent a particular hardware platform. Application-specific software is provided.

Transcription:

Introduction to Arduino With ArduBlock & LilyPad Dev Brian Huang Education Engineer brian.huang@sparkfun.com

Pre-Class Survey http://bit.ly/14xk3ek

Resources This PPT ArduBlock Download & Installation http://www.ardublock.com/

General Rules Raise your hand if you have a question. Be respectful. When I raise my hand Share your findings with the people near you. Poke around, experiment, and have fun Imagine, create, and play!!!

Objectives Provide a thorough introduction to the Arduino programming environment. Develop a use of simple functions to interact with the LEDs, light sensor, push button, and buzzer on the Protosnap Pro Mini.

Arduino LilyPad Protosnap Dev What is it? What can it do? Who cares?

What is it? Heart of it ATMega328 (a $4 microcontroller) Open Source High tolerance for ESD and bad electronics practices Provides easy way to interact with a computer physically a.k.a. physical computing

What can it do? - Great for prototyping ideas - Great to teach Intro to Programming Arduino (no assembly required!) - Lots and lots of options! - Large pads can be sewable

Who cares? Hackers / Makers Engineers Artists Musicians Kids! Teachers!! You!!!

Physical Computing

Components, Silk Screen & Pins What is all this??? the Brain ATmega328 Temp. Sensor Light Sensor Buzzer / Speaker

Actual Pin-outs

ArduBlock Introduction to Programming Scratch-like interface Clear transition to text-based coding

Block Organization Control

Block Organization Pins

Block Organization Numbers/Constants

Block Organization Operators

Block Organization Operators

Block Organization Utilities

Block Organization Utilities I 2 C

Understanding Input vs. Output Referenced from the perspective of the microcontroller (electrical board). Inputs is a signal / information going into the board. Output is any signal exiting the board. Almost all systems that use physical computing will have some form of output What are some examples of Outputs?

Startup Arduino IDE Double-click on either the Arduino Icon or wherever you installed (saved) the Arduino program.

Plug it in

Lesson #0 Configuring Arduino 1. Setup Board (LilyPad Arduino w/ ATmega328) 2. Setup COM Port PC Highest COM # Mac /dev/tty.usbserial-a####xxx

Settings: Tools Board

Settings: Tools Serial Port

Other Board Types

Load ArduBlock

Lesson #0 Test Upload

Check for Status Messages

Let s get to hacking Lesson #1 Blinking an LED Hello World of Physical Computing Psuedo-code how should this work? Turn LED ON Wait Turn LED OFF Wait Rinse & Repeat

Let s get to hacking Lesson #1 Blinking an LED Hello World of Physical Computing

LED Pins 16 18 17

How are Analog Pins really identified? Digital Pins are numbered 0 to 13. Analog Input Pins are A0 to A5. A0 = 14 A1 = 15 A2 = 16 A3 = 17 A4 = 18 A5 = 19

Alright? Let s blink! Challenge 1a Blink multiple LEDs Plan out a pattern can you make it? Challenge 1b Blink to mimic a heartbeat Challenge 1c Multiple LEDS Knight Rider style

Save your Project Save early, Save often! Enumerate your iterations (e.g. blink_10.adp, blink_11.adp, blink_12.adp )

Concept: Analog vs. Digital Microcontrollers are digital devices ON or OFF. An Analog signal is anything that can be a full range of values. What are some examples? Think of like a ramp or a hill.

Concept: Analog vs. Digital To create an analog signal, the microcontroller uses a technique called PWM. Pins 3, 5, 6, 9, 10, 11 are capable of producing an Analog Output Pulse Width Modulation (PWM)

Color Mixing with 3 LEDs analogwrite() Challenge 2a: 1) How do you turn on the RED LED? 2) Experiment with different values what do you observe happens? 3) How do you turn on the GREEN or the BLUE LED?

Color Mixing with 3 LEDs Tri-color LED The RGB LED is a Common- Anode (means the positive side of the LED is all tied to V cc ). 5 V The signal line is connected to the bottom of each LED. Don t worry - it s just a different method of completing a circuit! Pin 9 Pin 11 Pin 10

Color Mixing with 3 LEDs analogwrite() Challenge 2b: Experiment with different values of Red, Green, and Blue to create a couple different colors. Write down the values you used. Check these values with www.colorpicker.com Challenge 2c: Create a unique lighting display that integrates a blink, fade, or a switching of colors. Be prepared to have a name for your art piece and show this to the rest of the class.

Save your Project #2

Concept: If(), If() else conditional logic

Concept: If(), If() else conditional logic

A Simple Example Try this bit of code. DIG INPUT 2 What do you think will happen? Test it and write down your observations.

Analog Pin Mapping digital Inputs Buttons / Slide Switches What about this?? Analog Pin Digital I/O ID A0 14 A1 15 A2 16 A3 17 A4 18 A5 19 A6 20 INPUT A5 INPUT A5 (a.k.a. 19)

digital Inputs Buttons / Slide Switches Same as Pin A5 Challenge 3a: Re-arrange the blocks or add new ones to: Turn ON an LED when the button is pressed. Otherwise blink continuously

digital Inputs Buttons / Slide Switches Challenge 3b: Now, using the button / switch to start a disco/light changing pattern Challenge 3c: Now, using the button / switch to turn on and off the VIBE motor.

Serial Monitor Serial print command Any message glue Data

Example

Open up Serial Monitor

Reading the Light Sensor?

Challenge Use the light sensor input to affect the blink rate of the LEDs. Use the light sensor input to affect the speed of a knight-rider or cylon display. Use the light sensor to.

Save your Project #3 Sensors

Making Music Setting up the Speaker

Twinkle-Twinkle: Making Music Let s Play a song CC GG AA G FF EE DD C GG Happy Birthday: G G A G C B G G A G D C G G G E C C B A Hot Cross Buns: B A G <> B A G <> G G G G <> A A A A B A G Mary Had A Little Lamb: B A G A BB B <> AA A <> BB B <> B A G A BBBB AAA BAG.

Musical Notes / Frequencies Note Frequency (Hz) C 4 261 C # 4/D b 4 277 D 4 293 D # 4/E b 4 311 E 4 329 F 4 349 F # 4/G b 4 369 G 4 392 G # 4/A b 4 415 A 4 440 A # 4/B b 4 466 B 4 493 Note Frequency (Hz) C 5 523 C # 5/D b 5 554 D 5 587 D # 5/E b 5 622 E 5 659 F 5 698 F # 5/G b 5 739 G 5 783 G # 5/A b 5 830 A 5 880 A # 5/B b 5 932 B 5 987

Save your Project #4 Tone

Getting started with Arduino

Additional Resources http://www.sparkfun.com http://learn.sparkfun.com http://www.arduino.cc http://www.bildr.org

SparkFun Tutorials and Projects - GardenBot: www.sparkfun.com/news/598 - High Altitude Balloon: www.sparkfun.com/tutorials/180 - GPS Clock: www.sparkfun.com/tutorials/47 - Earthquake Data Logger: www.sparkfun.com/tutorials/235

Thousands of Amazing ideas The Cat Defender http://www.plasma2002.com/blenderdefende r/ List of projects at Sparkfun: http://goo.gl/2m3am

Questions?

Feedback? Before leaving, please fill out a quick survey so that I can get your e-mail and a little info about your familiarity with Arduino / Sparkfun. Thanks! http://bit.ly/zamdmk

www.sparkfun.com 6175 Longbow Drive, Suite 200 Boulder, Colorado 80301

Buttons / Slide Switches Digital Input, Pull-up Resistors, and digitalread() DIG INPUT

Buttons / Slide Switches Digital Input, Pull-up Resistors, and digitalread() DIG INPUT