Week 10 Today 1.Homework presentations and critique. 2.Review digital and analog inputs. 3.DIY - jumpers, soldering etc.

Slides:



Advertisements
Similar presentations
EMS1EP Lecture 6 Digital Inputs
Advertisements

Lab7: Introduction to Arduino
Intermediate Electronics and Lilypad Where Electronics Meet Textiles Workshop with Lynne Bruning and Troy Robert Nachtigall Sponsored by Spark Fun and.
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
How to use Arduino By: Andrew Hoffmaster.
Embedded Sumo 1T4 – 1T5 UTRA.
Intro to the Arduino Topics: The Arduino Digital IO Analog IO Serial Communication.
Basic Stamp II is kinda cool Bytes of EEPROM(non-volatile) - Clock speed of 20 MHz. - Holds 600 lines of code in EEPROM - executes an average of.
New Human Computer Interfaces Amnon Dekel HUJI – CSE, Spring 2007 Class 3 March
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.
Working with Arduino: Lesson #2: Variable, Photo, and Force Sensitive Resistors EGN1007.
Embedded Programming and Robotics Lesson 1 Basic Electricity and Electronics Transistor Basics Lesson 1 -- Basic Electricity1.
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #13 Gateway To Space ASEN 1400 / ASTR 2500 Class #13 T-53.
Embedded Programming and Robotics
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Arduino Part 2 Topics: Serial Communication Programming Constructs: functions, loops and conditionals Digital Input.
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58.
Image of Arduino. Arduino discussion Address issues with circuit walk-through – Electricity, Programming, Arduino Concepts Work on BeatTable (next week)
Working with Arduino: Lesson #3: Force Sensitive Resistors EGN1007.
Dean Brock, Rebecca Bruce and Susan Reiser, CCSC SE 2009 Using Arduino Material taken from Todbot blog Bionic Arduino Todbot blog Bionic ArduinoTodbot.
Intro to the Arduino Topics: The Arduino Digital IO
Introduction to the Arduino
1 of 20 Core Arduino Workshop Chris Koehler and Brian Sanders Colorado Space Grant Consortium.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis and Linz Craig.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis.
Circuits, Systems, & the Arduino. Challenge: Make the bulb light up! -Make observations and explain why it has the setup it does? - What are the components.
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:
Welcome to Week 4 at the Summer Computer Club Raspberry Pi (contd)
Microcontroller Hands-on Workshop #2 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers October 31, 2009.
Arduino The Internet of Things: Using the Arduino to Teach Coding.
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.
Embedded systems and sensors 1 Part 2 Interaction technology Lennart Herlaar.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Electronic instrumentation Digitization of Analog Signal in TD
Prototyping with Microcontrollers and Sensors. Overview Objective Background Information Problem Statement Materials Procedure Assignment Closing.
Harpeth Hall Jan 2016 Introduction to Arduino Prepared for Harpeth Hall Winterim January 2016.
The Internet of Things: Using the Arduino to Teach Coding
Microcontrollers & Electronics Basics OR…
Having fun with code, using Arduino in a middle school CS classroom
Arduino.
Assist. Prof. Rassim Suliyev - SDU 2017
Prototyping with Microcontrollers and Sensors
Microcontroller basics
Microprocessors Tutorial 1: Arduino Basics
Get Your Project Started with Arduino
Introduction to Handshaking Communication with SSC-32U
UCD ElecSoc Robotics Club 2017/2018
Arduino Part 1 Topics: Microcontrollers Programming Basics
Arduino Uno and sensors
Introduction to Arduino Microcontrollers
Introduction to Arduino Microcontrollers
Roller Coaster Design Project
Week 5: Microcontrollers
Arduino 101 Credit(s):
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Welcome to Digital Electronics using the Arduino Board
Arduino Part 4 Let there be more light.
CTY SAR FCPS Shawn Lupoli, Elliot Tan
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Arduino 7 Segment Display Lab
Aeroponic Engineering and Vertical Farming
Lab #1: Getting Started.
Arduino Uno circuit basics
Introduction to Arduinos
CTY SAR FCPS Alexander Velikanov
Presentation transcript:

Week 10 Today 1.Homework presentations and critique. 2.Review digital and analog inputs. 3.DIY - jumpers, soldering etc.

Homework Those who did not show last week show: 1.Either Knight Rider or Shooting Star 2.Potentiometer 3.New version of above with a control structure This week’s assignments: 1.Multiple switch assignment - make a project that uses at least 2 for interesting outputs. 2.Create project with two HOMEMADE switches. 3.Create a cool creative piece using at least one photocell and one other sensor and two LEDs or other outputs. This should be more than just some lights on your board, it should feel more finished - like the eyes project. As a class we’ll crit and vote on the best ones - they’ll get an extra credit mark. Criteria: creativity, function, ability to explain code, clarity of code THIS ONE MUST BE LIVE AND WORKING IN CLASS.

Review

Arduino Sketch Structure Top of sketch –Declare variables at top Initialize –setup() – run once at beginning, set pins Running –loop() – run repeatedly, after setup() Pins can be changed in loop() too, but conceptually easier in setup()

Arduino Programming

Known Good Configuration Rule #1 of experimenting: Before trying anything new, Get back to a known working state Get your entire edit->compile->upload->run working Even if it becomes so second nature to you that you feel you shouldn’t need to, do it anyway. Especially when mysterious problems arise, revert to a known state

Digital Input Switches make or break a connection Most inputs you’ll use are variations on switches Fundamentally, they’re all like the simple knife switch Knife Switch Toggle Switch

Digital Input Switches make or break a connection But Arduino wants to see a voltage Specifically, a “HIGH” (5 volts) or a “LOW” (0 volts)

Analog Inputs Many states, not just two (HIGH/LOW) Arduino has six ADC inputs (ADC = Analog to Digital Converter) Reads voltage between 0 to 5 volts Resolution is 10-bit (1024 states) You used this for the Potentiometer Homework exercise

An Analog Sensor Photocell, photoresistor, light-dependent resistor A variable resistor ANALOG Brighter light == lower resistance Photocells have range approx. 0-10k schematic symbol

Reading Diagrams Analog Sensor w/o Arduino shown Power Photocell Common Join Arduino pin (Analog pin 0) Resistor Ground

Reading Diagrams Switch w/Arduino Power LED Arduino pin (Digital pins) Ground Resistor Switch

Break, 10 minutes.

Do It Yourself! The exciting part of all this is that you can make almost anything…. If you are careful, thoughtful, and test, retest, and document your work.

Doing It Yourself Making Jumper Wires strip off about 1/2” of insulation Can use wire strippers, cutters, or fingers Can be a pain.. so often use pre-cut wires to save time but they do cost more.

Doing It Yourself The End Result ready to go in the Breadboard

Doing It Yourself Soldering Permanent connections When inputs and outputs need to be further away from the breadboard Demonstration (if we go to DT lab) Be careful not to overheat Watch for good connections Protect solder joints with hot glue when they are likely to be delicate or subject to stress Ventilation is good if you are doing a lot of it

Talking to the computer Communicating with Others Arduino can use same USB cable for programming and to talk with computers Talking to other devices uses the “Serial” commands Serial.begin() – prepare to use serial Serial.print() – send data to computer Serial.read() – read data from computer Can talk to not just computers. Most things more complex than simple sensors/actuators speak serial.

Talking to the computer Watch the TX/RX LEDS TX – sending to PC RX – receiving from PC Used when programming or communicating

Talking to the computer “serial_hello_world” Send “Hello world!” to your computer (and blink LED) Click on “Serial Monitor” to see output Watch TX LED compared to pin13 LED Assgn 1 Do this. Get it working and save it.

Telling Arduino what to do… “serial_read_basic” (get from ‘examples’) In “Serial Monitor” type “H”, press Send Watch pin 13 LED blink once Notice how you might not always read something, thus the “-1” check. Assign 2: Modify to print “hello world” after it receives something, but before it checks for ‘H’. This way you can verify it’s actually receiving something.

Cool! Now what? Now it’s your turn! Assignment 3: Add other outputs onto your board. Use different key commands to trigger them. Assignment 4: Get data in from an analog sensor and print it out in at least 3 formats. (hint: Assignment 5: Add other responses on the screen and have different sensors trigger them.

Homework Complete and post your work (description of project, photo of it, plus code) Assignment 1: Get basic serial communication working. Assignment 2: Modify to print “hello world” after it receives something, but before it checks for ‘H’. This way you can verify it’s actually receiving something. Assignment 3: Add other outputs onto your board. Use different key commands to trigger them. Assignment 4: Get data in from an analog sensor and print it out in at least 3 formats. (hint: Assignment 5: Add other responses on the screen and have different sensors trigger them. Extra Credit: Refine your best piece from last homework further and show in class at next class.