Book Project Sue Brandt Arduino Project 7-10-13 Interactive with LEDS.

Slides:



Advertisements
Similar presentations
Wireless Cue Light Project
Advertisements

Slide 1 Insert your own content. Slide 2 Insert your own content.
0 - 0.
Button Input: On/off state change Living with the Lab Gerald Recktenwald Portland State University
EMS1EP Lecture 6 Digital Inputs
EMS1EP Lecture 4 Intro to Programming Dr. Robert Ross.
ARDUINO CLUB What we’re really doing. BASICS The setup() and loop() functions.
Test B, 100 Subtraction Facts
Electrical team Arduino tutorial I BY: JOSHUA arduini
Lab7: Introduction to Arduino
ARDUINO FRAMEWORK.
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
Embedded Sumo 1T4 – 1T5 UTRA.
Panasonic EVE-KC2F2024B 24 pulses per revolution 6mm diameter flattened output shaft output type: quadrature (incremental) minimum life: 15,000 rotations.
Digital & Analog Inputs. Review Fundamental parts of an Arduino program are … Setting output types using pinMode. Declaring variables Can write a digital.
Intro to Arduino with LilyPad Make a MakerSpace, Artisan’s Asylum Linz Craig, Chris Taylor, Mike Hord & Joel Bartlett.
Finish your programs from last week STOPLIGHT CIRCUIT! You may need … – int – void setup() – void loop() – pinMode – digitalWrite – delay.
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Analog and Digital Measurements living with the lab 14 digital input / output pins 6 analog input pins © 2011 LWTL faculty team.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
DataInputFrom Digital PinsUsing an On/OFF button to control an LEDFrom Analog Pins Reading light intensity using a photocell and turning an LED on and.
ProtoSnap Introduction to Arduino Casey Haskell, Pete Lewis, David Stillman, Jim Lindblom, Pete Dokter, Lindsay Levkoff, Trevor Zylstra.
Introduction to the Arduino
Khaled A. Al-Utaibi  The Push Button  Interfacing Push Buttons to Arduino  Programming Digital Inputs  Working with “Bouncy”
Cascade switching of an LED EAS 199B Winter 2013.
Franz Duran INTRODUCTION TO A RDUINO PROGRAMMING & INTERFACING Engr. Franz Duran, MEP-ECE RapidSignal Electronics.
L ILY P AD T RAINING C ENTENNIAL E LEMENTARY 2012 Material by Linz Craig Revision by Sarah Bloms Additional images by Modkit & Adam Meyer.
Programming, Serial and Virtual Prototyping. Code if ( You like semicolons ) { Stay here for intro to Arduino code } else { Join the MODKit group for.
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
Basic Circuits – Lab 4 Serial and OSC (maybe some theory too) Xmedia Spring 2011.
Microcontroller Hands-on Workshop #2 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers October 31, 2009.
Arduino libraries Datatekniker Udvidet hardware/software.
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
Photoresistor resistance changes dramatically with light level living with the lab Using Photoresistors with an Arduino © 2011 LWTL faculty team.
Microcontroller basics Embedded systems for mortals.
Bdps 2 Lecture 2. Circuits and Ohm's Law For resistive circuits.
Introduction to Arduino A very basic intro to Arduino, the IDE and the Servos class.
Arduino + Bluetooth TYWu. Connection Arduino + Bluetooth Module.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
1 Transistor. 2 Transistors are used to turn components on and off They come in all different shapes and sizes.
Hacking on Arduino George Patterson
Assist. Prof. Rassim Suliyev - SDU 2017
Microcontroller basics
Microcontroller basics
Wireless Cue Light Project
UTA010 : Engineering Design – II
Welcome to Arduino A Microcontroller.
Get Your Project Started with Arduino
European Robotic LABoratory
UCD ElecSoc Robotics Club 2017/2018
INC 161 , CPE 100 Computer Programming
Control the color and brightness of an RGB LED with a Potentiometer
Introduction to Arduino Microcontrollers
How to avoid catching things on fire.
Introduction to Arduinos
Arduino 101 Credit(s):
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Interfacing a Rotary Encoder with an Arduino
Arduino : Introduction & Programming
Programming 2: The Arduino IDE & First Sketches
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Arduino Motor Lab Inspired by NYU ITP project
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Arduino Uno circuit basics
Introduction to Arduinos
Arduino程式範例.
Arduino UMBC IEEE Sekar Kulandaivel Week 3: Motor Control w/ H-Bridges
Presentation transcript:

Book Project Sue Brandt Arduino Project Interactive with LEDS

Objective Using arduino and xbee technology create a small closed system to create a fun interactive book for 3 year old child. Book accessories include wand and crown.

Planning 1. Obtain materials 2. Test ardiuno 3. Test xbee through serial port using XCTU 4. Test xbee for wireless operation using XCTU and terra term software 5. Create system diagram 6. Design control circuit and test 7. Write sketch for control circuit 8. Design wireless receiver circuit 9. Write sketch for receiver circuit

Planning continued 10. Test communication's between wireless circuits 11. Insert magnet switches 12. Test switches 13. Test wireless communications 14. Create wiring harness for book 15. Create wiring harness for receiver system. 16. Test book, wand and crown.

Software used Arduino X-CTU (XBEE) Fritzing

Hardware Used Arduino Xbee Xbee modem 10K resistors SPSB 4 pin switch LED; 7 3 color 2 -breadboard 2 -AA battery packs 6 volts per pack Misc breadboard wires

System 1 master cue light box to run remote cue light boxes. Controller Book Receiver Crown

Wiring Diagram for Book Controller

Sketch For control unit //3 color led controller to wireless led output // for interative childrens book version 1 // reciever program name:_3_color_reciever_crown //this projects program name_3_color_LED_redand_Blue_andgreen_controlver4 //july 10, 2013 int LedRed = 13; //location red led int LedBlue =12;//location blue led int LedGreen= 11;//location green led int delayPeriod = 250; int LedRbut = 4; // location of red button int LedBbut = 3; // location of blue button int LedGbut = 2; // location of green button int valR = 0; int valB = 0; int valG = 0; int old_valR = 0; int old_valB = 0; int old_valG = 0; int stateR = 0; int stateB = 0; int stateG = 0;

set-up: controller void setup(){ Serial.begin(9600); // send out signal please pinMode (LedRed,OUTPUT); pinMode (LedBlue, OUTPUT); pinMode (LedGreen, OUTPUT); pinMode (LedRbut, INPUT); pinMode(LedBbut, INPUT); pinMode(LedGbut, INPUT); }

program: controller void loop () { valR = digitalRead(LedRbut);// read input value of red button 4 and save if ((valR == HIGH) && (old_valR == LOW)) { stateR = 1-stateR; delay(10); } old_valR = valR; if (stateR == 1) { digitalWrite(LedRed, HIGH);//Red led on {Serial.print('R');}//send R to turn on remote red led } else { digitalWrite(LedRed, LOW); {Serial.print('r');}//send r to turn off remote red led } valB = digitalRead(LedBbut);// read input value of blue button 3 and save if ((valB == HIGH) && (old_valB == LOW)) { stateB = 1-stateB; delay(10); } old_valB = valB; if (stateB == 1) { digitalWrite(LedBlue, HIGH);//Blue led on {Serial.print('B');}//send B to turn on remote blue led } else { digitalWrite(LedBlue, LOW); {Serial.print('b');}//send B to turn off remote blue led } valG = digitalRead(LedGbut);// read input value of green button 2 and save if ((valG == HIGH) && (old_valG == LOW)) { stateG = 1-stateG; delay(10); } old_valG = valG; if (stateG == 1) { digitalWrite(LedGreen, HIGH);//Green led on {Serial.print('G');}// send G to turn on remote green led } else { digitalWrite(LedGreen, LOW); {Serial.print('g');}// send G to turn off remote green led }

Sketch for receiver /* / for interative childrens book version 1 // reciever program name:_3_color_reciever_crown //this projects program name_3_color_LED_redand_Blue_andgreen_controlver4 //july 10, 2013 */ const int LEDRed = 13;// the number of the Red LED pin const int LEDBlue = 12; //the number of the Blue Led pin const int LEDGreen = 11;// the number of the green led pin int incomingByte; //a variable to read incoming serial data //int val = 0; //val will be stored the state of the input pin Red //int valB = 0; //val will be stored the state of the input pin Blue //int old_valR= 0;// this variable stores the previous value red //int old_valB = 0; // this variable stores the previouse value blue //int stateR = 0; //0=Led red off and 1= Led red on //int stateB= 0; // 0= led blue off and 1= led blue on

Setup for receiver void setup() { Serial.begin(9600); pinMode(LEDRed, OUTPUT);//Red Led as output pinMode (LEDBlue, OUTPUT); //Blue Led as output pinMode (LEDGreen, OUTPUT); //Greeen led as output }

Program for receiver void loop() { if (Serial.available()) { incomingByte = Serial.read(); Serial.println(incomingByte); delay(100); //valB = Serial.read(); //delay(100); if (incomingByte == 'R') { digitalWrite(LEDRed, HIGH); } if (incomingByte == 'r') { digitalWrite(LEDRed, LOW); }

Program for receiver cont. if (incomingByte == 'B') { digitalWrite(LEDBlue, HIGH); } if (incomingByte == 'b') { digitalWrite(LEDBlue, LOW); }

Program for receiver end if (incomingByte == 'G') { digitalWrite(LEDGreen, HIGH); } if (incomingByte == 'g'){ digitalWrite (LEDGreen, LOW); } /* The joys of summer! */

Wiring diagram for Receiver

Lights ON!!

Conclusion Unit works. External harnesses need to be made. Book content to be produced.