CPSC 226 Lab Four Spring 2018

Size: px
Start display at page:

Download "CPSC 226 Lab Four Spring 2018"

Transcription

1 CPSC 226 Lab Four Spring 2018 Directions. This lab is a quick introduction to programming your Arduino to do some basic internal operations and arithmetic, perform character IO, read analog voltages, drive a piezo buzzer. This is just the first step toward having your Arduino do more ambitious stuff like control servo motors, drive LCD and RGBW displays, respond to a TV remote control, maintain a real time clock, etc. This lab counts 20 points toward your final grade. Programming Arduino: You should design and write your Arduino code in a consistent style and include useful comments for the reader. This will make reuse of your code easier for you as well and you will not have to go back and re-invent things. One time obligatory reminder for all programmers: MAKE TWO (OR MORE) BACKUPS OF YOUR CODE! YOU DO NOT WANT TO SPEND HOURS ON CODING ONLY TO HAVE IT ALL DISAPPEAR WHEN YOU DO SOMETHING CARELESS AT 2:30 AM! I will not repeat this suggestion again. Prelab You should check out the website, our Electronics Cookbook text by Simon Monk, and the very helpful reference Arduino Cookbook, 2 nd edition by Michael Margolis, so you get a sense of what is available for sensors, motors, visual displays, etc. Useful online sources include the following: IMPORTANT: READ THROUGH THE API! As you know by now, each Arduino-compatible board (including those from Adafruit, Sparkfun, etc) supports different peripherals, sensors, etc which are often made accessible via an API implemented by a C++ library appropriate for that device and usually sample code along with it. Free libraries support real time clocks, SD cards, NeoPixels, motor drivers, etc. Your particular Arduino may have no sensors included or may have many sensors already on the board, such as the Esplora. Note the Arduino Esplora form factor does NOT allow use of standard Arduino shields nor does it have a standard barrel power receptacle for using a wall wart or battery power supply! This just means you will need to provide circuits for these devices off the Arduino boards. All these kinds of options will influence how you design your Arduino-based projects as we proceed. More on this is coming as we get deeper into design and Arduino coding. Read through the basic language constructs of Arduino in the recipes in Chapter 10.1, 10.2 in your textbook. You do not need to know all the details of the language yet but it is very useful to know what C++ and Java equivalents exist in Arduino. Variables, loops, if...else, math operations, programmer defined functions, parameters, etc are all very much like Java but often simpler in Arduino. These are what this lab is about so you get used to using a variety of Arduino API functions, methods, and interfacing hardware. I strongly suggest thumbing through Electronics Cookbook just to see what kinds of hardware can be interfaced with Arduino (or Raspberry Pi). Next, look through recipes Chapters 1-8 in Arduino Cookbook so you know where to locate code when you need to display serial output, read switches and analog inputs, connect to and control servos, display data on typical LCDs, read Sharp sensors, etc. A final word of caution. We are now entering the domain where you have to pay close attention to what you are actually doing when using LEDs, servos, sensors, and other devices. Misuse or improper connections can result in real damage to your Arduino, the servos and sensors, or both. I will be demonstrating connections

2 of devices to various models of Arduino. Download and install the latest version of the Arduino software at Software on your own computer. There are versions for all the major platforms. READ THE GET- TING STARTED DOCUMENTATION ABOUT ISSUES FOR EACH PLATFORM. GETTING THE USB DRIVER CONNECTION RIGHT IS OFTEN AN ANNOYING CHALLENGE. After installation, start up Arduino and check out the IDE environment available for programming Arduino devices. You will see your Arduino Editing/Compiling/Upload/Serial IO environment which looks something like Figure 1. Notice under the Arduino menu you can set basic preferences for your editing environment including font, line numbering, etc. The File menu allows open/edit/save source code files (Arduino originally called them sketches). Check out the MANY examples of Arduino sketches for doing all sorts of things. Note: You can verify (syntax check) any sketch but cannot upload a program to an Arduino board unless one is attached via USB cable, which we will do in the lab itself. For a similar reason, you cannot display messages in the IDE Serial Monitor until you have an Arduino connected by a USB cable. I will illustrate these processes in class. Looking at the form of the Arduino programming language you will notice it has very similar syntax to Java but more closely resembles C++, both Figure 1: Arduino IDE. OOP descendants of the venerable C programming language. You can program Arduino in C but that topic is beyond the scope of this course. We have other ambitions. At the Arduino IDE, open the File/Examples/Basics/Blink program. Notice the Blink program structure contains two methods/functions/subroutines: setup and loop. These two methods are required in all Arduino programs. The function setup is automatically called exactly once each time your Arduino program is executed or Arduino is reset. The function loop is automatically called endlessly whenever your program runs so you can use its automatic looping nature to read some data, compute a response, display results of the response, etc. This is not unlike the Processing language setup and draw functions. In fact, these two programming languages, Arduino and Processing, share a common heritage. Reading the comments in the Blink program, see if you can figure out how it would endlessly blink an LED on the Arduino board by executing the instructions given. What circuit must also be present on the board to safely blink an LED? Hint: there has to be at least an LED! Draw a schematic of just the LED/resistor arrangement you would expect to find when looking at an Arduino board schematic and go look at your Arduino UNO (or other board) schematic and find the circuit in question. A Quick Look at Hardware Look at your Arduino board (Duemilanove, UNO, MEGA, Boarduino, Metro, whatever...) and locate the digital pins labelled 0-13, the analog to digital (ADC) pins 0-5, +5V pin, external power connector, and GND pins on the edges of the board. Pins 0 and 1 are not usually available for our use as they are part of Arduino s USB/RX/TX communication channel. More on that in the coming days. We will exercise these digital and analog to digital pins in this lab. End of Prelab Start the Arduino IDE, wait a few seconds, then then under the Tools menu, select your Arduino board AND the proper serial port as I demonstrated in class. If no suitable USB board appears, re-read the Getting Started guide on the Arduino website for your particular Arduino board and the USB connection procedure. You might need to install USB drivers for Windows when using Arduino.

3 NOTE: If you are using a third party board such as Adafruit Metro, you should add that new board to the Arduino IDE so it will appear as a board option! Instructions are found at Open the File/Examples/Basics/Blink example. Verify (this means syntax check/compile) and then upload the program to your Arduino so you know the board works and the communication channel is established. You should see an LED on the board blinking. Exercise 1. Modify the Blink program so the LED blinks faster. Once this works correctly, modify your sketch so the LED blinks slower. Modify the Blink program so the LED blink rate changes from slower to faster then back to slower and so on. You can declare and use an integer variable to set variable delays. Now, save your program and include your program code in your lab writeup. Note, you cannot save a sketch to replace the Arduino Examples provided by the IDE. SAVING A SKETCH REQUIRES PUTTING IT INSIDE AN IDENTICALLY NAMED FOLDER. Annoying, yes, but there it is. Below is about the simplest program to provide symbolic program feedback from Arduino to the user/programmer. Notice we have to initialize our Serial object using Serial.begin(...) in function setup and then use the Serial.println(...) method to write to the Serial Monitor window. You open the Serial Monitor using the icon at the upper right of the Arduino IDE. void setup() { // put your setup code here, to run once: Serial.begin(9600); // Sets baud rate for serial communication } void loop() { // put your main code here, to run repeatedly: Serial.println("Hello World"); delay(1000); } Exercise 2. Write, save, compile and run this program (call it HelloWorld) so it works as expected. Experiment with Serial.print(...) instead of Serial.println(...) so you get comfortable with printing to the Serial Monitor. Change the baud rates of the Serial object AND the Serial Monitor. What happens if their baud rates do not match? Add some integer, char, boolean, byte, etc variables then modify your Hello World example so it prints integer values instead of just fixed character strings. Note: You can control printing format of various data types by using the optional second parameter like these examples show below. Try out a few examples so you see how to control the format of printed numbers. Serial.println(28, DEC); Serial.println(28, HEX); Serial.println(28, BIN); Serial.println(0x35, DEC); // 0x prefix designates hexadecimal (base 16) value Serial.println(0x35, HEX);

4 Serial.println(0x35, BIN); Serial.println(0b , DEC); // 0b prefix designates binary (base 2) value Serial.println(28,OCT); Exercise 3. What is the largest positive integer which can be held in an Arduino int type variable? What value do you get if you add one to that value? Show me code that helped you figure this out. Check out the File/Examples/Communication/ASCIITable sketch. Compile, run it, and see if you understand how the program does what it does. After the ASCII table is printed, press the reset button on the Arduino board, what happens? Exercise 4. Modify the ASCIITable sketch so it prints all the ASCII chars from What is the result of extending the print range? What was printed? Can you guess from the output what some of the low (0-31) ASCII chars do? Exercise 5. Open the File/Examples/Basic/BareMinimum sketch. Add an integer variable to this code, save it as CountingNumbers, and now add code to have your program print the sequence 1, 2, 3,..., 100 then enter an infinite loop and print nothing more. Include your program code in your lab writeup. Exercise 6. Modify your previous code so you print this endless sequence 2, 3, 5, 7, 11, 13, 17,... You MUST create a function in your code which returns a boolean type to determine whether an integer is prime or not as part of your code. Save this new program as Primes and include this primo program code in your lab writeup. Exercise 7. Design, write, run and debug a single program called AllTypesOfStuff to demonstrate that Arduino supports boolean, float, char, int, unsigned int, byte, double, and array data types pretty much unchanged from your familiar Java syntax. Include your program code in your lab writeup. Exercise 8. Read the API for String types in Arduino. Design and create an Arduino program, not a copy of an existing Example, which illustrates how to declare a String object and use at least five familiar string functions such as computing length, get a char at a position in a String object, etc. Extra Credit: Design and write an Arduino program to code/decode the so-called Caesar cipher method of encoding text messages. If you type an coded message in the Serial Monitor, Arduino should decode it and display the clear text. If you send clear text, Arduino should show the encoded message. Return to hardware. Basic Arduinos have six analog to digital converter (ADC) pins labeled A0-A5 which allow us to read analog voltages from 0V to +5V as binary coded values. This is very useful in handling interactions with an analog world of sensor voltages, light intensity values, sound levels, etc. BE SURE YOU UNDERSTAND THE PLACEMENT AND LIMITATIONS OF +5V AND GND PIN LOCATIONS ON ARDUINO. IMPROPERLY SHORTING +5V TO GND PINS ON ARDUINO CAN DESTROY THE VOLTAGE REG- ULATOR WHICH MAKES THE BOARD UNUSABLE! ASK IF YOU ARE UNSURE! Figure 2: Potentiometer symbols. Recall the schematic in Figure 2 shows a potentiometer which is ideal for making an adjustable voltage divider. Remember the value of a pot is the total resistance between the two outer pins 1 and 3. If we apply V+/Vdd/Vcc to pin 1 and GND to pin 3, the middle pin 2, or wiper, acts as output of an adjustable voltage divider.

5 Exercise 9. Create a circuit like this one shown in Figure 3 on a breadboard using a potentiometer of at least 10K ohms and some jumper wires. Notice the pot has +5V connected to one end and GND connected to the other. The center wiper is the output of a voltage divider. Check the output using a yellow/orange DVM to see it works as you think it will. Exercise 10. Read the Arduino sketch found at File/Examples/Basics/AnalogReadSerial and see how you can measure and print the analog voltage value at the pot slider pin. Now code your own program that simply reads the analog pin A3 and prints a resulting integer value to the Serial Monitor. Record some output ADC values. From the values you obtain, can you determine the numeric range of the analog to digital converter on Arduino? Include your code in the writeup. Figure 3: Potentiometer voltage divider. Exercise 11. Now read the Arduino sketch found at File/Examples/Analog/AnalogOutSerial. What does this code do? How does it differ from the previous analog reading sketch? What new Arduino syntax/constructs/functions does it contain? Notice this analog read then set PWM (look it up!) presumes you have an LED (with current limiting resistor we presume) connected to Arduino (digital pin) D9. So, make and add that LED circuit and test the code to see what it does. Include your schematic and describe how the program works. Use a DVM to measure voltage at the output pin D9. What do you read? Exercise 12. Design a simple sensor circuit that allows Arduino to detect light levels using a Cadmium Sulfide (CdS) photocell, a resistor of a suitable value, a flashlight/phone, and an Arduino. A circuit similar to this was covered in Lab 2. Remember, double check your circuit so you avoid high current flow through direct shorts or very low resistance. Here is the action we want. Light falls on your CdS sensor which affects the voltage divider output feeding an Arduino ADC. The program prints a notice to the Serial Monitor whenever the analog level indicates the light beam has been disrupted. This makes is a break beam sensor and is the essential circuit used in car washes, parking garage sensors, security systems, etc. Arduino speaks up! We want to make Arduino beep to signal when your light sensor has been triggered. You should look for a tutorial/recipe on Arduino and piezo buzzers before you begin to design your circuit and code. Include a very tidy schematic of your entire circuit, including Arduino, sensor and buzzer, as well as the source code you used for your detector. End of lab

6

Arduino Lesson 1. Blink. Created by Simon Monk

Arduino Lesson 1. Blink. Created by Simon Monk Arduino Lesson 1. Blink Created by Simon Monk Guide Contents Guide Contents Overview Parts Part Qty The 'L' LED Loading the 'Blink' Example Saving a Copy of 'Blink' Uploading Blink to the Board How 'Blink'

More information

TWEAK THE ARDUINO LOGO

TWEAK THE ARDUINO LOGO TWEAK THE ARDUINO LOGO Using serial communication, you'll use your Arduino to control a program on your computer Discover : serial communication with a computer program, Processing Time : 45 minutes Level

More information

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs 10-11 Introduction to Arduino In this lab we will introduce the idea of using a microcontroller as a tool for controlling

More information

For this exercise, you will need a partner, an Arduino kit (in the plastic tub), and a laptop with the Arduino programming environment.

For this exercise, you will need a partner, an Arduino kit (in the plastic tub), and a laptop with the Arduino programming environment. Physics 222 Name: Exercise 6: Mr. Blinky This exercise is designed to help you wire a simple circuit based on the Arduino microprocessor, which is a particular brand of microprocessor that also includes

More information

FABO ACADEMY X ELECTRONIC DESIGN

FABO ACADEMY X ELECTRONIC DESIGN ELECTRONIC DESIGN MAKE A DEVICE WITH INPUT & OUTPUT The Shanghaino can be programmed to use many input and output devices (a motor, a light sensor, etc) uploading an instruction code (a program) to it

More information

J. La Favre Using Arduino with Raspberry Pi February 7, 2018

J. La Favre Using Arduino with Raspberry Pi February 7, 2018 As you have already discovered, the Raspberry Pi is a very capable digital device. Nevertheless, it does have some weaknesses. For example, it does not produce a clean pulse width modulation output (unless

More information

Attribution Thank you to Arduino and SparkFun for open source access to reference materials.

Attribution Thank you to Arduino and SparkFun for open source access to reference materials. Attribution Thank you to Arduino and SparkFun for open source access to reference materials. Contents Parts Reference... 1 Installing Arduino... 7 Unit 1: LEDs, Resistors, & Buttons... 7 1.1 Blink (Hello

More information

Computational Crafting with Arduino. Christopher Michaud Marist School ECEP Programs, Georgia Tech

Computational Crafting with Arduino. Christopher Michaud Marist School ECEP Programs, Georgia Tech Computational Crafting with Arduino Christopher Michaud Marist School ECEP Programs, Georgia Tech Introduction What do you want to learn and do today? Goals with Arduino / Computational Crafting Purpose

More information

Lab 5: Arduino Uno Microcontroller Innovation Fellows Program Bootcamp Prof. Steven S. Saliterman

Lab 5: Arduino Uno Microcontroller Innovation Fellows Program Bootcamp Prof. Steven S. Saliterman Lab 5: Arduino Uno Microcontroller Innovation Fellows Program Bootcamp Prof. Steven S. Saliterman Exercise 5-1: Familiarization with Lab Box Contents Objective: To review the items required for working

More information

ARDUINO / GENUINO. start as professional

ARDUINO / GENUINO. start as professional ARDUINO / GENUINO start as professional . ARDUINO / GENUINO start as professional short course in a book MOHAMMED HAYYAN ALSIBAI SULASTRI ABDUL MANAP Publisher Universiti Malaysia Pahang Kuantan 2017 Copyright

More information

smraza Getting Start Guide Contents Arduino IDE (Integrated Development Environment)... 1 Introduction... 1 Install the Arduino Software (IDE)...

smraza Getting Start Guide Contents Arduino IDE (Integrated Development Environment)... 1 Introduction... 1 Install the Arduino Software (IDE)... Getting Start Guide Contents Arduino IDE (Integrated Development Environment)... 1 Introduction... 1 Install the Arduino Software (IDE)...1 Introduction... 1 Step 1: Get an Uno R3 and USB cable... 2 Step

More information

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O)

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O) PH-315 Portland State University MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O) ABSTRACT A microcontroller is an integrated circuit containing a processor and programmable read-only memory, 1 which is

More information

Coding with Arduino to operate the prosthetic arm

Coding with Arduino to operate the prosthetic arm Setup Board Install FTDI Drivers This is so that your RedBoard will be able to communicate with your computer. If you have Windows 8 or above you might already have the drivers. 1. Download the FTDI driver

More information

Lab 2: Blinkie Lab. Objectives. Materials. Theory

Lab 2: Blinkie Lab. Objectives. Materials. Theory Lab 2: Blinkie Lab Objectives This lab introduces the Arduino Uno as students will need to use the Arduino to control their final robot. Students will build a basic circuit on their prototyping board and

More information

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1 HAW-Arduino Sensors and Arduino 14.10.2010 F. Schubert HAW - Arduino 1 Content of the USB-Stick PDF-File of this script Arduino-software Source-codes Helpful links 14.10.2010 HAW - Arduino 2 Report for

More information

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE LABORATORY 7: IR SENSORS AND DISTANCE DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF NEVADA, LAS VEGAS GOAL: This section will introduce

More information

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O)

MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O) PH-315 Portland State University MICROCONTROLLERS BASIC INPUTS and OUTPUTS (I/O) ABSTRACT A microcontroller is an integrated circuit containing a processor and programmable read-only memory, 1 which is

More information

CURIE Academy, Summer 2014 Lab 2: Computer Engineering Software Perspective Sign-Off Sheet

CURIE Academy, Summer 2014 Lab 2: Computer Engineering Software Perspective Sign-Off Sheet Lab : Computer Engineering Software Perspective Sign-Off Sheet NAME: NAME: DATE: Sign-Off Milestone TA Initials Part 1.A Part 1.B Part.A Part.B Part.C Part 3.A Part 3.B Part 3.C Test Simple Addition Program

More information

Application Note. Communication between arduino and IMU Software capturing the data

Application Note. Communication between arduino and IMU Software capturing the data Application Note Communication between arduino and IMU Software capturing the data ECE 480 Team 8 Chenli Yuan Presentation Prep Date: April 8, 2013 Executive Summary In summary, this application note is

More information

Module: Arduino as Signal Generator

Module: Arduino as Signal Generator Name/NetID: Teammate/NetID: Module: Laboratory Outline In our continuing quest to access the development and debugging capabilities of the equipment on your bench at home Arduino/RedBoard as signal generator.

More information

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools MAE106 Laboratory Exercises Lab # 1 - Laboratory tools University of California, Irvine Department of Mechanical and Aerospace Engineering Goals To learn how to use the oscilloscope, function generator,

More information

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K. Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K. Roberts Page 1 See Appendix A, for Licensing Attribution information

More information

EE 109 Midterm Review

EE 109 Midterm Review EE 109 Midterm Review 1 2 Number Systems Computer use base 2 (binary) 0 and 1 Humans use base 10 (decimal) 0 to 9 Humans using computers: Base 16 (hexadecimal) 0 to 15 (0 to 9,A,B,C,D,E,F) Base 8 (octal)

More information

ZX Distance and Gesture Sensor Hookup Guide

ZX Distance and Gesture Sensor Hookup Guide Page 1 of 13 ZX Distance and Gesture Sensor Hookup Guide Introduction The ZX Distance and Gesture Sensor is a collaboration product with XYZ Interactive. The very smart people at XYZ Interactive have created

More information

1. Introduction to Analog I/O

1. Introduction to Analog I/O EduCake Analog I/O Intro 1. Introduction to Analog I/O In previous chapter, we introduced the 86Duino EduCake, talked about EduCake s I/O features and specification, the development IDE and multiple examples

More information

Training Schedule. Robotic System Design using Arduino Platform

Training Schedule. Robotic System Design using Arduino Platform Training Schedule Robotic System Design using Arduino Platform Session - 1 Embedded System Design Basics : Scope : To introduce Embedded Systems hardware design fundamentals to students. Processor Selection

More information

ARDUINO / GENUINO. start as professional. short course in a book. faculty of engineering technology

ARDUINO / GENUINO. start as professional. short course in a book. faculty of engineering technology ARDUINO / GENUINO start as professional short course in a book faculty of engineering technology Publisher Universiti Malaysia Pahang Kuantan 2017 Copyright Universiti Malaysia Pahang, 2017 First Published,

More information

Welcome to Arduino Day 2016

Welcome to Arduino Day 2016 Welcome to Arduino Day 2016 An Intro to Arduino From Zero to Hero in an Hour! Paul Court (aka @Courty) Welcome to the SLMS Arduino Day 2016 Arduino / Genuino?! What?? Part 1 Intro Quick Look at the Uno

More information

Disclaimer. Arduino Hands-On 2 CS5968 / ART4455 9/1/10. ! Many of these slides are mine. ! But, some are stolen from various places on the web

Disclaimer. Arduino Hands-On 2 CS5968 / ART4455 9/1/10. ! Many of these slides are mine. ! But, some are stolen from various places on the web Arduino Hands-On 2 CS5968 / ART4455 Disclaimer! Many of these slides are mine! But, some are stolen from various places on the web! todbot.com Bionic Arduino and Spooky Arduino class notes from Tod E.Kurt!

More information

INA169 Breakout Board Hookup Guide

INA169 Breakout Board Hookup Guide Page 1 of 10 INA169 Breakout Board Hookup Guide CONTRIBUTORS: SHAWNHYMEL Introduction Have a project where you want to measure the current draw? Need to carefully monitor low current through an LED? The

More information

Understanding the Arduino to LabVIEW Interface

Understanding the Arduino to LabVIEW Interface E-122 Design II Understanding the Arduino to LabVIEW Interface Overview The Arduino microcontroller introduced in Design I will be used as a LabVIEW data acquisition (DAQ) device/controller for Experiments

More information

A servo is an electric motor that takes in a pulse width modulated signal that controls direction and speed. A servo has three leads:

A servo is an electric motor that takes in a pulse width modulated signal that controls direction and speed. A servo has three leads: Project 4: Arduino Servos Part 1 Description: A servo is an electric motor that takes in a pulse width modulated signal that controls direction and speed. A servo has three leads: a. Red: Current b. Black:

More information

Application Note AN 157: Arduino UART Interface to TelAire T6613 CO2 Sensor

Application Note AN 157: Arduino UART Interface to TelAire T6613 CO2 Sensor Application Note AN 157: Arduino UART Interface to TelAire T6613 CO2 Sensor Introduction The Arduino UNO, Mega and Mega 2560 are ideal microcontrollers for reading CO2 sensors. Arduino boards are useful

More information

The wiring is relatively simple. You should put the module on one of the compatible Arduinos. The following are compatible:

The wiring is relatively simple. You should put the module on one of the compatible Arduinos. The following are compatible: Welcome! And thank you for purchasing our AZ-Delivery Data Logger module for the Arduino. On the following pages, we will take you through the first steps of the installation process on the Arduino. We

More information

Grove - Infrared Receiver

Grove - Infrared Receiver Grove - Infrared Receiver The Infrared Receiver is used to receive infrared signals and also used for remote control detection. There is an IR detector on the Infrared Receiver which is used to get the

More information

Arduino Microcontroller Processing for Everyone!: Third Edition / Steven F. Barrett

Arduino Microcontroller Processing for Everyone!: Third Edition / Steven F. Barrett Arduino Microcontroller Processing for Everyone!: Third Edition / Steven F. Barrett Anatomy of a Program Programs written for a microcontroller have a fairly repeatable format. Slight variations exist

More information

Arduino An Introduction

Arduino An Introduction Arduino An Introduction Hardware and Programming Presented by Madu Suthanan, P. Eng., FEC. Volunteer, Former Chair (2013-14) PEO Scarborough Chapter 2 Arduino for Mechatronics 2017 This note is for those

More information

Lesson 3: Arduino. Goals

Lesson 3: Arduino. Goals Introduction: This project introduces you to the wonderful world of Arduino and how to program physical devices. In this lesson you will learn how to write code and make an LED flash. Goals 1 - Get to

More information

LAB #10: Analog Interfacing

LAB #10: Analog Interfacing CS/EE 3720 Handout #10 Spring 2004 Myers LAB #10: Analog Interfacing You must checkoff this lab during your lab section of the week of April 19th. Lab writeup is due in class on April 27th. NO LATE CHECKOFFS

More information

Montgomery Village Arduino Meetup Dec 10, 2016

Montgomery Village Arduino Meetup Dec 10, 2016 Montgomery Village Arduino Meetup Dec 10, 2016 Making Microcontrollers Multitask or How to teach your Arduinos to walk and chew gum at the same time (metaphorically speaking) Background My personal project

More information

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE LABORATORY 6: INTRODUCTION TO BREADBOARDS DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF NEVADA, LAS VEGAS GOAL: This section introduces

More information

Preface. If you have any problems for learning, please contact us at We will do our best to help you solve the problem.

Preface. If you have any problems for learning, please contact us at We will do our best to help you solve the problem. Preface Adeept is a technical service team of open source software and hardware. Dedicated to applying the Internet and the latest industrial technology in open source area, we strive to provide best hardware

More information

EARTH PEOPLE TECHNOLOGY. EPT-200TMP-TS-U2 Temperature Sensor Docking Board User Manual

EARTH PEOPLE TECHNOLOGY. EPT-200TMP-TS-U2 Temperature Sensor Docking Board User Manual EARTH PEOPLE TECHNOLOGY EPT-200TMP-TS-U2 Temperature Sensor Docking Board User Manual The EPT-200TMP-TS-U2 is a temperature sensor mounted on a docking board. The board is designed to fit onto the Arduino

More information

LESSONS Lesson 1. Microcontrollers and SBCs. The Big Idea: Lesson 1: Microcontrollers and SBCs. Background: What, precisely, is computer science?

LESSONS Lesson 1. Microcontrollers and SBCs. The Big Idea: Lesson 1: Microcontrollers and SBCs. Background: What, precisely, is computer science? LESSONS Lesson Lesson : Microcontrollers and SBCs Microcontrollers and SBCs The Big Idea: This book is about computer science. It is not about the Arduino, the C programming language, electronic components,

More information

Portland State University MICROCONTROLLERS

Portland State University MICROCONTROLLERS PH-315 MICROCONTROLLERS INTERRUPTS and ACCURATE TIMING I Portland State University OBJECTIVE We aim at becoming familiar with the concept of interrupt, and, through a specific example, learn how to implement

More information

DFRduino Romeo All in one Controller V1.1(SKU:DFR0004)

DFRduino Romeo All in one Controller V1.1(SKU:DFR0004) DFRduino Romeo All in one Controller V1.1(SKU:DFR0004) DFRduino RoMeo V1.1 Contents 1 Introduction 2 Specification 3 DFRduino RoMeo Pinout 4 Before you start 4.1 Applying Power 4.2 Software 5 Romeo Configuration

More information

Objectives: Learn what an Arduino is and what it can do Learn what an LED is and how to use it Be able to wire and program an LED to blink

Objectives: Learn what an Arduino is and what it can do Learn what an LED is and how to use it Be able to wire and program an LED to blink Objectives: Learn what an Arduino is and what it can do Learn what an LED is and how to use it Be able to wire and program an LED to blink By the end of this session: You will know how to use an Arduino

More information

APDS-9960 RGB and Gesture Sensor Hookup Guide

APDS-9960 RGB and Gesture Sensor Hookup Guide Page 1 of 12 APDS-9960 RGB and Gesture Sensor Hookup Guide Introduction Touchless gestures are the new frontier in the world of human-machine interfaces. By swiping your hand over a sensor, you can control

More information

Milli Developer Kit Reference Application Published on Silver Spring Networks STAGE (

Milli Developer Kit Reference Application Published on Silver Spring Networks STAGE ( Milli Developer Kit Example Application PART 1 Example CoAP Server Sensor Implementation With The Milli Dev Kit Get the Milli Developer Kit Temperature Sensor Reference Application on GitHub [1] This reference

More information

Experiment 1: Robot Moves in 3ft squared makes sound and

Experiment 1: Robot Moves in 3ft squared makes sound and Experiment 1: Robot Moves in 3ft squared makes sound and turns on an LED at each turn then stop where it started. Edited: 9-7-2015 Purpose: Press a button, make a sound and wait 3 seconds before starting

More information

1Getting Started SIK BINDER //3

1Getting Started SIK BINDER //3 SIK BINDER //1 SIK BINDER //2 1Getting Started SIK BINDER //3 Sparkfun Inventor s Kit Teacher s Helper These worksheets and handouts are supplemental material intended to make the educator s job a little

More information

Analog Feedback Servos

Analog Feedback Servos Analog Feedback Servos Created by Bill Earl Last updated on 2018-01-21 07:07:32 PM UTC Guide Contents Guide Contents About Servos and Feedback What is a Servo? Open and Closed Loops Using Feedback Reading

More information

CONSTRUCTION GUIDE IR Alarm. Robobox. Level I

CONSTRUCTION GUIDE IR Alarm. Robobox. Level I CONSTRUCTION GUIDE Robobox Level I This month s montage is an that will allow you to detect any intruder. When a movement is detected, the alarm will turn its LEDs on and buzz to a personalized tune. 1X

More information

Programming a Servo. Servo. Red Wire. Black Wire. White Wire

Programming a Servo. Servo. Red Wire. Black Wire. White Wire Programming a Servo Learn to connect wires and write code to program a Servo motor. If you have gone through the LED Circuit and LED Blink exercises, you are ready to move on to programming a Servo. A

More information

Application Note AN 102: Arduino I2C Interface to K 30 Sensor

Application Note AN 102: Arduino I2C Interface to K 30 Sensor Application Note AN 102: Arduino I2C Interface to K 30 Sensor Introduction The Arduino UNO, MEGA 1280 or MEGA 2560 are ideal microcontrollers for operating SenseAir s K 30 CO2 sensor. The connection to

More information

LED + Servo 2 devices, 1 Arduino

LED + Servo 2 devices, 1 Arduino LED + Servo 2 devices, 1 Arduino Learn to connect and write code to control both a Servo and an LED at the same time. Many students who come through the lab ask if they can use both an LED and a Servo

More information

INTRODUCTION to MICRO-CONTROLLERS

INTRODUCTION to MICRO-CONTROLLERS PH-315 Portland State University INTRODUCTION to MICRO-CONTROLLERS Bret Comnes and A. La Rosa 1. ABSTRACT This laboratory session pursues getting familiar with the operation of microcontrollers, namely

More information

Setup Download the Arduino library (link) for Processing and the Lab 12 sketches (link).

Setup Download the Arduino library (link) for Processing and the Lab 12 sketches (link). Lab 12 Connecting Processing and Arduino Overview In the previous lab we have examined how to connect various sensors to the Arduino using Scratch. While Scratch enables us to make simple Arduino programs,

More information

Arduino as a tool for physics experiments

Arduino as a tool for physics experiments Journal of Physics: Conference Series PAPER OPEN ACCESS Arduino as a tool for physics experiments To cite this article: Giovanni Organtini 2018 J. Phys.: Conf. Ser. 1076 012026 View the article online

More information

Lesson 13. The Big Idea: Lesson 13: Infrared Transmitters

Lesson 13. The Big Idea: Lesson 13: Infrared Transmitters Lesson Lesson : Infrared Transmitters The Big Idea: In Lesson 12 the ability to detect infrared radiation modulated at 38,000 Hertz was added to the Arduino. This lesson brings the ability to generate

More information

3.5 hour Drawing Machines Workshop

3.5 hour Drawing Machines Workshop 3.5 hour Drawing Machines Workshop SIGGRAPH 2013 Educator s Focus Sponsored by the SIGGRAPH Education Committee Overview: The workshop is composed of three handson activities, each one introduced with

More information

LEVEL A: SCOPE AND SEQUENCE

LEVEL A: SCOPE AND SEQUENCE LEVEL A: SCOPE AND SEQUENCE LESSON 1 Introduction to Components: Batteries and Breadboards What is Electricity? o Static Electricity vs. Current Electricity o Voltage, Current, and Resistance What is a

More information

Arduino Sensor Beginners Guide

Arduino Sensor Beginners Guide Arduino Sensor Beginners Guide So you want to learn arduino. Good for you. Arduino is an easy to use, cheap, versatile and powerful tool that can be used to make some very effective sensors. This guide

More information

Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013

Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013 Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013 Legal Stuff Stensat Group LLC assumes no responsibility and/or liability for the use of the kit and documentation. There is a 90 day warranty for the

More information

Analog-to-Digital Converter. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Analog-to-Digital Converter. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name MPSD A/D Lab Exercise Analog-to-Digital Converter Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on this assignment with your partner. Hand in a

More information

Rodni What will yours be?

Rodni What will yours be? Rodni What will yours be? version 4 Welcome to Rodni, a modular animatronic animal of your own creation for learning how easy it is to enter the world of software programming and micro controllers. During

More information

Total Hours Registration through Website or for further details please visit (Refer Upcoming Events Section)

Total Hours Registration through Website or for further details please visit   (Refer Upcoming Events Section) Total Hours 110-150 Registration Q R Code Registration through Website or for further details please visit http://www.rknec.edu/ (Refer Upcoming Events Section) Module 1: Basics of Microprocessor & Microcontroller

More information

Adafruit 16-Channel Servo Driver with Arduino

Adafruit 16-Channel Servo Driver with Arduino Adafruit 16-Channel Servo Driver with Arduino Created by Bill Earl Last updated on 2015-09-29 06:19:37 PM EDT Guide Contents Guide Contents Overview Assembly Install the Servo Headers Solder all pins Add

More information

Programming 2 Servos. Learn to connect and write code to control two servos.

Programming 2 Servos. Learn to connect and write code to control two servos. Programming 2 Servos Learn to connect and write code to control two servos. Many students who visit the lab and learn how to use a Servo want to use 2 Servos in their project rather than just 1. This lesson

More information

PSoC and Arduino Calculator

PSoC and Arduino Calculator EGR 322 Microcontrollers PSoC and Arduino Calculator Prepared for: Dr. Foist Christopher Parisi (390281) Ryan Canty (384185) College of Engineering California Baptist University 05/02/12 TABLE OF CONTENTS

More information

PLAN DE FORMACIÓN EN LENGUAS EXTRANJERAS IN-57 Technology for ESO: Contents and Strategies

PLAN DE FORMACIÓN EN LENGUAS EXTRANJERAS IN-57 Technology for ESO: Contents and Strategies Lesson Plan: Traffic light with Arduino using code, S4A and Ardublock Course 3rd ESO Technology, Programming and Robotic David Lobo Martínez David Lobo Martínez 1 1. TOPIC Arduino is an open source hardware

More information

ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab

ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab The purpose of this lab is to learn about sensors and use the ADC module to digitize the sensor signals. You will use the digitized signals

More information

Exercise 5: PWM and Control Theory

Exercise 5: PWM and Control Theory Exercise 5: PWM and Control Theory Overview In the previous sessions, we have seen how to use the input capture functionality of a microcontroller to capture external events. This functionality can also

More information

EE 314 Spring 2003 Microprocessor Systems

EE 314 Spring 2003 Microprocessor Systems EE 314 Spring 2003 Microprocessor Systems Laboratory Project #9 Closed Loop Control Overview and Introduction This project will bring together several pieces of software and draw on knowledge gained in

More information

Trinket Powered Analog Meter Clock

Trinket Powered Analog Meter Clock Trinket Powered Analog Meter Clock Created by Mike Barela Last updated on 2016-02-08 02:13:11 PM EST Guide Contents Guide Contents Overview Building the Circuit Preparing to Code Debugging Issues Code

More information

INTRODUCTION to MICRO-CONTROLLERS

INTRODUCTION to MICRO-CONTROLLERS PH-315 Portland State University INTRODUCTION to MICRO-CONTROLLERS Bret Comnes, Dan Lankow, and Andres La Rosa 1. ABSTRACT A microcontroller is an integrated circuit containing a processor and programmable

More information

Project Proposal. Underwater Fish 02/16/2007 Nathan Smith,

Project Proposal. Underwater Fish 02/16/2007 Nathan Smith, Project Proposal Underwater Fish 02/16/2007 Nathan Smith, rahteski@gwu.edu Abstract The purpose of this project is to build a mechanical, underwater fish that can be controlled by a joystick. The fish

More information

Blink. EE 285 Arduino 1

Blink. EE 285 Arduino 1 Blink At the end of the previous lecture slides, we loaded and ran the blink program. When the program is running, the built-in LED blinks on and off on for one second and off for one second. It is very

More information

Unit 24: Controlling Systems Using IT

Unit 24: Controlling Systems Using IT Unit 24: Controlling Systems Using IT Theory Handbook 2014-2015 With Owen Name Group Introduction to Unit 24 Embedded control systems are appearing in every area of life. They include toys, TV remote controls,

More information

Pulse-Width-Modulation Motor Speed Control with a PIC (modified from lab text by Alciatore)

Pulse-Width-Modulation Motor Speed Control with a PIC (modified from lab text by Alciatore) Laboratory 14 Pulse-Width-Modulation Motor Speed Control with a PIC (modified from lab text by Alciatore) Required Components: 1x PIC 16F88 18P-DIP microcontroller 3x 0.1 F capacitors 1x 12-button numeric

More information

CONSTRUCTION GUIDE Capacitor, Transistor & Motorbike. Robobox. Level VII

CONSTRUCTION GUIDE Capacitor, Transistor & Motorbike. Robobox. Level VII CONSTRUCTION GUIDE Capacitor, Transistor & Motorbike Robobox Level VII Capacitor, Transistor & Motorbike In this box, we will understand in more detail the operation of DC motors, transistors and capacitor.

More information

Digital Multifunctional RC-Soundmodule TBS Mini V2

Digital Multifunctional RC-Soundmodule TBS Mini V2 Digital Multifunctional RC-Soundmodule TBS Mini V2 Important notes about changes on the NEW TBS Mini V2!!! MUST BE READ!!! New connector: External amplifier Volume Unchanged connectors (same as old TBS

More information

Using the S5U13781R01C100 Shield Graphics Library with Atmel Studio

Using the S5U13781R01C100 Shield Graphics Library with Atmel Studio Using the S5U13781R01C100 Shield Graphics Library with Atmel Studio Document Number: X94A-B-002-01 Status: Revision 1.0 Issue Date: 2015/07/30 SEIKO EPSON CORPORATION Rev. 1.0 Page 2 NOTICE No part of

More information

100UF CAPACITOR POTENTIOMETER SERVO MOTOR MOTOR ARM. MALE HEADER PIN (3 pins) INGREDIENTS

100UF CAPACITOR POTENTIOMETER SERVO MOTOR MOTOR ARM. MALE HEADER PIN (3 pins) INGREDIENTS 05 POTENTIOMETER SERVO MOTOR MOTOR ARM 100UF CAPACITOR MALE HEADER PIN (3 pins) INGREDIENTS 63 MOOD CUE USE A SERVO MOTOR TO MAKE A MECHANICAL GAUGE TO POINT OUT WHAT SORT OF MOOD YOU RE IN THAT DAY Discover:

More information

Arduino: Sensors for Fun and Non Profit

Arduino: Sensors for Fun and Non Profit Arduino: Sensors for Fun and Non Profit Slides and Programs: http://pamplin.com/dms/ Nicholas Webb DMS: @NickWebb 1 Arduino: Sensors for Fun and Non Profit Slides and Programs: http://pamplin.com/dms/

More information

Internet of Things with Arduino and the CC3000

Internet of Things with Arduino and the CC3000 Internet of Things with Arduino and the CC3000 WiFi chip In this guide, we are going to see how to connect a temperature & humidity sensor to an online platform for connected objects, Xively. The sensor

More information

Demon Pumpkin APPROXIMATE TIME (EXCLUDING PREPARATION WORK): 1 HOUR PREREQUISITES: PART LIST:

Demon Pumpkin APPROXIMATE TIME (EXCLUDING PREPARATION WORK): 1 HOUR PREREQUISITES: PART LIST: Demon Pumpkin This is a lab guide for creating your own simple animatronic pumpkin. This project encourages students and makers to innovate upon the base design to add their own personal touches. APPROXIMATE

More information

LoRa Quick Start Guide

LoRa Quick Start Guide LoRa Quick Start Guide The Things Uno Tweetonig Rotterdam (English) v1.0 - written for Things Uno v4 Index LoRa Quick Start Guide 1 The Things Uno 1 Index 2 Specifications 3 CPU: ATmega32u4 3 Pin layout

More information

Introduction to. An Open-Source Prototyping Platform. Hans-Petter Halvorsen

Introduction to. An Open-Source Prototyping Platform. Hans-Petter Halvorsen Introduction to An Open-Source Prototyping Platform Hans-Petter Halvorsen Contents 1.Overview 2.Installation 3.Arduino Starter Kit 4.Arduino TinkerKit 5.Arduino Examples 6.LabVIEW Interface for Arduino

More information

Light Emitting Diode IV Characterization

Light Emitting Diode IV Characterization Light Emitting Diode IV Characterization In this lab you will build a basic current-voltage characterization tool and determine the IV response of a set of light emitting diodes (LEDs) of various wavelengths.

More information

Arduino Control of Tetrix Prizm Robotics. Motors and Servos Introduction to Robotics and Engineering Marist School

Arduino Control of Tetrix Prizm Robotics. Motors and Servos Introduction to Robotics and Engineering Marist School Arduino Control of Tetrix Prizm Robotics Motors and Servos Introduction to Robotics and Engineering Marist School Motor or Servo? Motor Faster revolution but less Power Tetrix 12 Volt DC motors have a

More information

Workshops Elisava Introduction to programming and electronics (Scratch & Arduino)

Workshops Elisava Introduction to programming and electronics (Scratch & Arduino) Workshops Elisava 2011 Introduction to programming and electronics (Scratch & Arduino) What is programming? Make an algorithm to do something in a specific language programming. Algorithm: a procedure

More information

CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II

CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II CONSTRUCTION GUIDE Robotic Arm Robobox Level II Robotic Arm This month s robot is a robotic arm with two degrees of freedom that will teach you how to use motors. You will then be able to move the arm

More information

ENGR 40M Project 3c: Responding to music

ENGR 40M Project 3c: Responding to music ENGR 40M Project 3c: Responding to music For due dates, see the overview handout 1 Introduction This week, you will build on the previous two labs and program the Arduino to respond to an input from the

More information

Introduction to the Arduino Kit

Introduction to the Arduino Kit 1 Introduction to the Arduino Kit Introduction Arduino is an open source microcontroller platform used for sensing both digital and analog input signals and for sending digital and analog output signals

More information

.:Twisting:..:Potentiometers:.

.:Twisting:..:Potentiometers:. CIRC-08.:Twisting:..:Potentiometers:. WHAT WE RE DOING: Along with the digital pins, the also has 6 pins which can be used for analog input. These inputs take a voltage (from 0 to 5 volts) and convert

More information

SCHOOL OF TECHNOLOGY AND PUBLIC MANAGEMENT ENGINEERING TECHNOLOGY DEPARTMENT

SCHOOL OF TECHNOLOGY AND PUBLIC MANAGEMENT ENGINEERING TECHNOLOGY DEPARTMENT SCHOOL OF TECHNOLOGY AND PUBLIC MANAGEMENT ENGINEERING TECHNOLOGY DEPARTMENT Course ENGT 3260 Microcontrollers Summer III 2015 Instructor: Dr. Maged Mikhail Project Report Submitted By: Nicole Kirch 7/10/2015

More information

Using the SparkFun PicoBoard and Scratch

Using the SparkFun PicoBoard and Scratch Page 1 of 7 Using the SparkFun PicoBoard and Scratch Introduction Scratch is an amazing tool to teach kids how to program. Often, we focus on creating fun animations, games, presentations, and music videos

More information

Checking Battery Condition and Multiplexing I/O Lines

Checking Battery Condition and Multiplexing I/O Lines Column #5, July 1995 by Scott Edwards: Checking Battery Condition and Multiplexing I/O Lines THIS month s first application was contributed by Guy Marsden of ART TEC, Oakland, California. Guy, a former

More information

System Board 6219 MAXREFDES89#: MAX14871 Full-Bridge DC Motor Driver MBED Shield

System Board 6219 MAXREFDES89#: MAX14871 Full-Bridge DC Motor Driver MBED Shield System Board 6219 MAXREFDES89#: MAX14871 Full-Bridge DC Motor Driver MBED Shield Introduction Brushed DC motors provide cost-effective, convenient motion in many applications ranging from electric toothbrushes

More information