ARDUINO DRIVERS LICENCE

Similar documents
Introduction to Arduino

Microcontroller Programming Beginning with Arduino. Charlie Mooney

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

Arduino Lesson 14. Servo Motors

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

Electronic Brick of Current Sensor

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Arduino Lesson 1. Blink

DEPARTMENT OF ELECTRONICS ENGINEERING

Basic Pulse Width Modulation

Arduino Microcontroller Guide W. Durfee, University of Minnesota ver. oct-2011 Available on-line at

Arduino Lesson 16. Stepper Motors

ANDROID BASED FARM AUTOMATION USING GR-SAKURA

Arduino Lesson 9. Sensing Light

Arduino Lesson 13. DC Motors. Created by Simon Monk

Arduino project. Arduino board. Serial transmission

4/Really Getting Started with Arduino

Start with Arduino: Introduction to. the Creative Use of. Electronics. Made in Germany. by Stefan Hermann

1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows:

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

Lab 6 Introduction to Serial and Wireless Communication

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

Sharp IR Range Finder (GP2D12,GP2D120)

Basic DC Motor Circuits. Living with the Lab Gerald Recktenwald Portland State University

Basic DC Motor Circuits

Arduino Shield Manual

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

Arduino DUE + DAC MCP4922 (SPI)

Cornerstone Electronics Technology and Robotics I Week 15 Voltage Comparators Tutorial

Arduino Internet Connectivity: Maintenance Manual Julian Ryan Draft No. 7 April 24, 2015

Conversion Between Analog and Digital Signals

How To Use An Ams 5812 Pressure Sensor With A Usb Starter Kit

CanSat Program. Stensat Group LLC

Computer Architectures

1 Coffee cooling : Part B : automated data acquisition

Trinket Bluetooth Alarm System

Servo Info and Centering

AirCasting Particle Monitor Bill of Materials

System theremino MasterDIL-V3

Ultrasonic Distance Measurement Module

RC2200DK Demonstration Kit User Manual

Controlling a Dot Matrix LED Display with a Microcontroller

C4DI Arduino tutorial 4 Things beginning with the letter i

DS1307 Real Time Clock Breakout Board Kit

Working with microcontroller-generated audio frequencies (adapted from the Machine Science tutorial)

Home Security System for Automatic Doors

Electronics 5: Arduino, PWM, Mosfetts and Motors

Arduino Lesson 4. Eight LEDs and a Shift Register

How To Control A Car With A Thermostat

Introduction to Arduino

Surveillance System Using Wireless Sensor Networks

The Operational Amplfier Lab Guide

WxGoos-1 Climate Monitor Installation Instructions Page 1. Connections. Setting an IP Address

WEB log. Device connection plans

1 of 5 12/31/ :51 AM

Arduino Lesson 17. Sending Movement Detector

Radio sensor powered by a mini solar cell the EnOcean STM 110 now functions with even less light

Sending an SMS with Temboo

Three Arduino Challenges to Connect the Logical World with the Physical One. ISTE Philadelphia

TSL2561 Luminosity Sensor

Arduino-Based Dataloggers: Hardware and Software David R. Brooks Institute for Earth Science Research and Education V 1.2, June, , 2015

H-Bridge Motor Control

User Manual for CH-PFC76810

Arduino Lesson 0. Getting Started

Lecture 7: Programming for the Arduino

MANUAL FOR RX700 LR and NR

IR Communication a learn.sparkfun.com tutorial

RGB for ZX Spectrum 128, +2, +2A, +3

3½ DIGIT VOLTMETER MODULE LED- / LCD- SERIES

If an occupancy of room is zero, i.e. room is empty then light source will be switched off automatically

Temperature Measurement with a Thermistor and an Arduino

Arduino Starter Kit Grove-Starter Kit

Modular I/O System Analog and Digital Interface Modules

Digital I/O: OUTPUT: Basic, Count, Count+, Smart+

Business/Home GSM Alarm System. Installation and User Manual

Building a Basic Communication Network using XBee DigiMesh. Keywords: XBee, Networking, Zigbee, Digimesh, Mesh, Python, Smart Home

Digital to Analog and Analog to Digital Conversion

Temperature Measurement with a Thermistor and an Arduino

Wireless Security Camera

THERMAL ANEMOMETRY ELECTRONICS, SOFTWARE AND ACCESSORIES

Tutorials for Arduino

Contents. Document information

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

A REST API for Arduino & the CC3000 WiFi Chip

Process modules Digital input PMI for 24 V DC inputs for 120 V AC inputs

Arduino Shield Manual

Analogue Input, 4-fold, MDRC AE/S 4.1, GH Q R0001

POINTS POSITION INDICATOR PPI4

Thermistor. Created by Ladyada. Last updated on :30:46 PM EDT

Lab 3 - DC Circuits and Ohm s Law

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT BIT DIFFERENTIAL ADC WITH I2C LTC2485 DESCRIPTION

Lab E1: Introduction to Circuits

Experiment: Series and Parallel Circuits

User Guide Reflow Toaster Oven Controller

MIDECO 64-outputs MIDI note decoder USER MANUAL. Roman Sowa 2012

ESP 8266: A BREAKTHROUGH IN WIRELESS SENSOR NETWORKS AND INTERNET OF THINGS

Project Plan. Project Plan. May Logging DC Wattmeter. Team Member: Advisor : Ailing Mei. Collin Christy. Andrew Kom. Client: Chongli Cai

Points Position Indicator (PPI1) for Points Motors with Common Ground

Model SRMD Setra Remote Monitoring Display

Creating a Project with PSoC Designer

Transcription:

ARDUINO DRIVERS LICENCE Lesson 1 Get to know the tools/make a circuit (14 minute video) https://www.youtube.com/watch?v=2x8d_r0p92u Estimated time: 20-30 minutes Concepts What is a circuit? Ground and power, transducers, circuits in series, current, parallel circuits

A simple Circuit that turns the light on when we push the button. Power runs from the 5V (5 volt) on the arduino to the positive (+) rail on the breadboard, up the wire to the pushbutton, when the pushbutton is pressed, it sends power to the LED, through the resistor, back down the wire to the negative rail (-) and back to the GND (ground) pin on the Arduino. Because the LED only needs 1.7 volts, we use the resistor to protect it from getting too much power and burning out. Extra: Can you make Parallel and series circuits? A circuit in series needs every button to be pressed A circuit in parallel needs only one button to be pressed. When would you use each type of circuit?

Lesson 2 Spaceship Interface (7 minute Video) https://www.youtube.com/watch?v=7joqvt1oeda Estimated time: 20-30 minutes Concepts Introduction to arduino programming, variables, loops, board setup, if then/else loop, digitalread

/* Project 2 - Spaceship Interface Created 13 September 2012 by Scott Fitzgerald http://arduino.cc/starterkit This example code is part of the public domain */ // Create a global variable to hold the // state of the switch. This variable is persistent // throughout the program. Whenever you refer to // switchstate, you re talking about the number it holds int switchstate = 0; void setup(){ // declare the LED pins as outputs pinmode(3,output); pinmode(4,output); pinmode(5,output); // declare the switch pin as an input pinmode(2,input); void loop(){ // read the value of the switch // digitalread() checks to see if there is voltage // on the pin or not switchstate = digitalread(2); // if the button is not pressed // blink the red LEDs if (switchstate == HIGH) { digitalwrite(3, HIGH); // turn the green LED on pin 3 on digitalwrite(4, LOW); // turn the red LED on pin 4 off digitalwrite(5, LOW); // turn the red LED on pin 5 off // this else is part of the above if() statement. // if the switch is not LOW (the button is pressed) // the code below will run else { digitalwrite(3, LOW); // turn the green LED on pin 3 off digitalwrite(4, LOW); // turn the red LED on pin 4 off digitalwrite(5, HIGH); // turn the red LED on pin 5 on // wait for a quarter second before changing the light delay(250); digitalwrite(4, HIGH); // turn the red LED on pin 4 on digitalwrite(5, LOW); // turn the red LED on pin 5 off // wait for a quarter second before changing the light delay(250);

Lesson 3 Love-o-meter (14 minute video) https://www.youtube.com/watch?v=rjpkugf4lre Estimated time: 20-30 minutes Concepts Digital and Analog pins, input components,analog read, for loop, multiple if statements

by Scott Fitzgerald // named constant for the pin the sensor is connected to const int sensorpin = A0; // room temperature in Celcius const float baselinetemp = 20.0; void setup(){ // open a serial connection to display values Serial.begin(9600); // set the LED pins as outputs // the for() loop saves some extra coding for(int pinnumber = 2; pinnumber<5; pinnumber++){ pinmode(pinnumber,output);

digitalwrite(pinnumber, LOW); void loop(){ // read the value on AnalogIn pin 0 // and store it in a variable int sensorval = analogread(sensorpin); // send the 10-bit sensor value out the serial port Serial.print("sensor Value: "); Serial.print(sensorVal); // convert the ADC reading to voltage float voltage = (sensorval/1024.0) * 5.0; // Send the voltage level out the Serial port Serial.print(", Volts: "); Serial.print(voltage); // convert the voltage to temperature in degrees C // the sensor changes 10 mv per degree // the datasheet says there's a 500 mv offset // ((volatge - 500mV) times 100) Serial.print(", degrees C: "); float temperature = (voltage -.5) * 100; Serial.println(temperature); // if the current temperature is lower than the baseline // turn off all LEDs if(temperature < baselinetemp){ digitalwrite(2, LOW); digitalwrite(3, LOW); digitalwrite(4, LOW); // if the temperature rises 2-4 degrees, turn an LED on else if(temperature >= baselinetemp+2 && temperature < baselinetemp+4){ digitalwrite(2, HIGH); digitalwrite(3, LOW); digitalwrite(4, LOW); // if the temperature rises 4-6 degrees, turn a second LED on else if(temperature >= baselinetemp+4 && temperature < baselinetemp+6){ digitalwrite(2, HIGH); digitalwrite(3, HIGH); digitalwrite(4, LOW); // if the temperature rises more than 6 degrees, turn all LEDs on else if(temperature >= baselinetemp+6){ digitalwrite(2, HIGH); digitalwrite(3, HIGH); digitalwrite(4, HIGH); delay(1);

Lesson 4 Light Theremin (video 12 min) https://www.youtube.com/watch?v=57s3dylfw3i Estimated time: 20-30 minutes

/* Arduino Starter Kit example Light Theremin This sketch is written to accompany Project 6 in the Arduino Starter Kit Created 13 September 2012 by Scott Fitzgerald http://arduino.cc/starterkit This example code is part of the public domain */ // variable to hold sensor value int sensorvalue; // variable to calibrate low value int sensorlow = 1023; // variable to calibrate high value int sensorhigh = 0; // LED pin const int ledpin = 13; void setup() { // Make the LED pin an output and turn it on pinmode(ledpin, OUTPUT); digitalwrite(ledpin, HIGH); // calibrate for the first five seconds after program runs while (millis() < 5000) { // record the maximum sensor value sensorvalue = analogread(a5); if (sensorvalue > sensorhigh) { sensorhigh = sensorvalue; // record the minimum sensor value if (sensorvalue < sensorlow) { sensorlow = sensorvalue; // turn the LED off, signaling the end of the calibration period digitalwrite(ledpin, LOW); void loop() { //read the input from A0 and store it in a variable sensorvalue = analogread(a5); // map the sensor values to a wide range of pitches int pitch = map(sensorvalue, sensorlow, sensorhigh, 50, 4000); // play the tone for 20 ms on pin 8 tone(6, pitch, 20); // wait for a moment delay(10);

Lesson 5 Safecracker https://www.youtube.com/watch?v=bqxavhnnmeo Estimated time: 20-30 minutes Concepts Servos, if then statements/map function. Trimpot or potentiometer: This type of component allows us to change the resistance on the component by turning the knob or screw. A common use for these types of component are volume controls.

#include <Servo.h> Servo myservo; int potpin = 0; int rawval; int val; const int Led1=6; const int Piezo=4; int combone=50; void setup() { myservo.attach(9); pinmode(led1, OUTPUT); pinmode(piezo, OUTPUT); pinmode(potpin, INPUT); randomseed(analogread(potpin)); combone=random(0,180); Serial.begin(9600); void loop() { Serial.println(combone); rawval = analogread(potpin); //Serial.print(rawval); val = map(rawval, 0, 1023, 0, 179); Serial.print(" "); myservo.write(val); Serial.println(val); delay(15); if (val == combone) { digitalwrite(led1,high); tone(4, 100, 25); else { digitalwrite(led1, LOW);