Lab 6 Introduction to Serial and Wireless Communication

Size: px
Start display at page:

Download "Lab 6 Introduction to Serial and Wireless Communication"

Transcription

1 University of Pennsylvania Department of Electrical and Systems Engineering ESE 111 Intro to Elec/Comp/Sys Engineering Lab 6 Introduction to Serial and Wireless Communication Introduction: Up to this point, you have only used sensors and pushbuttons to control the input to your Arduino. You will now learn how to receive communication signals or commands on the Arduino from the serial port. You have used Serial.print() to transmit communication signals to the serial monitor. Serial.read() will allow to you send characters from the input line on the serial monitor to the Arduino. First, you will learn how to send commands to the Arduino via the serial port using the keyboard and how to interpret the input. You will use these commands to control the behavior of an LED. Then, you will learn how to use two XBee modules to transmit and receive information wirelessly. XBee is a brand of low-power radio transmitter/receiver, based on the ZigBee digital communication protocol, which uses the serial port to communicate. You will program one Arduino board to transmit one byte per second through an XBee module. The other Arduino will receive the byte through an XBee module configured on the same channel as the transmitter, and it will turn an LED on or off based on the identity of the byte. Next, you will use the XBee modules to remotely control an LED on one Arduino with a photoresistor on another Arduino. Finally, you will transmit accelerometer data wirelessly to control the brightness of an LED using pulse width modulation (PWM). Created by Nick Howarth, EE 13 Last updated: October 9, 2012 Figure 1: Transmitter and Receiver Modules

2 Goals: - To understand the basics of serial communication. - To learn about ASCII encoding. - To wirelessly control the lighting of an LED using Zigbee. - To understand pulse width modulation (PWM). 1. Introduction to Serial Communication (Adapted excerpt from BE 470, Lab 3; written by Prof. Dan Bogen) Serial.read() is an Arduino function that allows to you send characters from the input line on the serial monitor to the Arduino. The Serial.read() function is used like this: int inputcharacter; inputcharacter = Serial.read(); Serial.read() takes its input from the USB port, the same port that is used for Serial.print(). To initialize both of these functions, you need to use the Serial.begin(9600) instruction. Serial.read() is a bit of a pain to use because it only can take in one character at a time. It can t just accept the number 123 and know that it means one-hundred-twenty-three. Instead, you have to take in the 1 character, 2 character, and 3 character, and then let the Arduino know that you want the number 123. The characters are received as numerical codes a number corresponding to each alphanumeric character on the keyboard. Part of the table of codes is shown below. For instance, the letter a is coded by the number 97, and capital A by 65. The 1 character is coded by the number 49, the 2 character by the number 50, and so on. One useful feature of the Arduino language is that the expression X, where X is a single character (i.e., a single character enclosed by single quotes) is equal to the numerical code for that character. For instance a = 95, 1 = 49, etc. This will be useful in Arduino programming, as we will see a little later. These codes are called ASCII codes, ASCII standing for American Standard Code for Information Interchange. A table of ASCII representations can be found at the following link (you only need to focus on the Dec and Char columns: 2

3 Other functions related to Serial.read() are: Serial.flush() The serial port has an input buffer, so there may be some characters left over in the buffer that you don t want to read. Serial.flush() empties this buffer so that you can read new characters. Serial.available() This function returns the number of characters in the input buffer. So, Serial.available > 0 means that there is something to read. Notes: 1. Serial.read() will wait until a character is available before returning a value. So if there is nothing there, it will hang until there is. This means that it sometimes makes sense to check whether there are characters present (using Serial.available()) before using Serial.read(). 2. Serial.available() will indicate that there are characters present as soon as there are some. But if a whole string of characters is being sent to the Arduino, Serial.available() will be > 0 before all the characters get to the Arduino. For this reason, sometimes it makes sense to wait a few milliseconds (maybe 5) after Serial.available() > 0 before reading the characters in so that you know that they are all there. Here are some code fragments that demonstrate how to use Serial.read() to control the Arduino. Fragment #1 Using letter commands from the serial monitor to control the Arduino. int inputchar; if Serial.available() > 0 { inputchar = Serial.read(); if (inputchar == a ;) { // do something if (inputchar == b ) { // do something else 3

4 Fragment #2 Reading a number into the Arduino from the serial monitor int inputchar; int inputnumber; inputnumber = 0; if Serial.available() > 0 { delay(5); while Serial.available() > 0 { // build the number as long as there are characters inputchar = Serial.read(); // build number from left to right, shifting left by multiplying by 10 inputnumber = inputnumber * 10 + (inputchar - 0 ); // why inputchar 0? Make sure you understand this! 2. Control of an LED using input from keyboard 1) Write a program that accepts a character input from the serial monitor. The on-board LED connected to pin 13 should turn on if the input is H, and the LED on pin 13 should turn off if the input is L. Otherwise, nothing should happen. a. Remember to initialize serial communication by putting Serial.begin(9600) in setup(). b. Remember to set pin 13 to an output by adding pinmode(13, OUTPUT)in setup(). c. Copy this code into a text file. You will use it in the next section. 2) Write a program that reads in a number from the serial monitor. Use the input number to control the flashing rate of the LED on pin 13; that is, use the input number as the argument in your delay functions. a. Copy this code into a text file. You will use it in section Remote Control of an LED using XBees In this section, you will wirelessly transmit H and L characters from one Arduino to another Arduino (instead of from keyboard to Arduino), and the receiver will turn on or off an LED accordingly, as in the previous section. This wireless communication is possible using XBees. The XBee modules work by transmitting data in the form of bytes (e.g. ASCII characters) through the serial port. This means that any character that is printed to the serial monitor (from the transmitter) is received on the other module. You can fetch these characters on the receiving end the same way you would if you were just entering characters directly into the serial monitor. Only XBees that are on the same channel will be able to communicate with each other; this is 4

5 what allows us to have multiple pairs of XBees communicating in one room without interference. Make sure that your XBee modules have the same number written on them. It is important to note that the XBee has two different modes: USB (Programming) mode and XBee mode (Figure 2). The USB mode is used when you are uploading code to your Arduino, and the XBee mode is used when you want to run the code (i.e. to transmit/receive data). These modes are determined by the position of small jumpers on the XBee Arduino shield. A close-up view of the jumper positions is shown in Figure 3. If you receive an error when trying to upload your code, first check that the jumpers are removed! Figure 2: USB (Programming) mode vs. XBee mode Figure 3: Close-up of jumper position for XBee mode. (Note: just take jumpers off for USB mode.) 5

6 Receiver Module a. Connect the XBee Shield and set the Receiver Arduino module in USB Programming mode Connect the XBee Shield to the Arduino Board as shown in Figure 2 (or Figure 5). Remove the jumpers to set the XBee module in USB programming mode. Please do not lose the jumpers (Figure 4)! Figure 4: Jumpers (DO NOT LOSE!) Figure 5: Arduino XBee Shield in USB Programming Mode b. Upload the receiver code to the Arduino Upload your code from part 1) of the previous section. This code should accept a character input from the serial monitor. The on-board LED connected to pin 13 should turn on if the input is H, and the LED on pin 13 should turn off if the input is L. d. Set the Receiver Arduino module in XBee mode Connect the jumpers to the XBee shield, as shown in Figure 3 (or Figure 6), to set it in XBee mode. This will be the receiver Arduino module. 6

7 Figure 6: Arduino XBee Shield in XBee Mode Transmitter Module f. Follow step a to set the Transmitter Arduino module in USB Programming mode g. Upload the following code to the Transmitter Arduino module void setup(){ Serial.begin(9600); // initialize serial communication void loop(){ Serial.print( L ); delay(1000); Serial.print( H ); delay(1000); h. Set the Transmitter Arduino module in XBee mode as in step d, by connecting the jumper wires i. Observe the flashing LED In the Arduino window containing the code for the transmitter, open the serial monitor by pressing the Serial Monitor button to the right of the Upload button. You should see alternating L s and R s appear every second. The LED on the receiver module should blink on and off based on the serial data transmitted from the transmitter module. 7

8 4. Remote control of an LED using a photoresistor circuit and XBees This part requires you to construct a circuit on both the receiving and transmitting Arduino boards. However, there is no room to fit a breadboard on the Arduino since it is occupied by the XBee shield. For this reason, we have constructed extension shields that can hold a breadboard shield, XBee shield, and LCD screen all on one shield. The only limitation is that each component occupies a number of digital I/O pins; consequently, only two components can be used at a time. In this part of the lab, you will use the extension shield to hold the XBee shield and the breadboard shield. Connect your shields as shown in Figure 7. Transmitter Receiver Figure 7: Configuration of Arduino Shields on Extension Shield Transmitter Module a. Construct the circuit given by the schematic in Figure 8. Choose any analog pin (0-5). Figure 8: Transmitter voltage divider circuit 8

9 b. Set the Arduino in USB Programming mode (remove jumpers) and upload the following code: int analogpin = ***; // change *** to the pin number you're reading from int value; void setup(){ Serial.begin(9600); // initialize serial communication pinmode(analogpin, INPUT); void loop(){ value = analogread(analogpin); if(value >= 150){ // you may need to modify this argument Serial.print( L ); delay(500); if(value < 150){ // you may need to modify this argument Serial.print( D ); delay(500); c. Set the Transmitter Arduino in XBee mode by connecting the jumpers. Receiver Module d. Construct the circuit given by the schematic in Figure 9. Figure 9 - Receiver LED circuit e. Set the Arduino in USB Programming mode (remove jumpers) and copy the following code into the Arduino IDE window. 9

10 const int ledpin = 12; // the pin that the LED is attached to int incomingbyte; // a variable to read incoming serial data into void setup() { Serial.begin(9600); // initialize serial communication pinmode(ledpin, OUTPUT); // initialize the LED pin as an output void loop() { // your code here f. Finish writing the code above such that the LED turns on when the photocell on the transmitter is covered and is off otherwise. g. Set the Arduino in XBee mode by connecting the jumpers. Demonstrate to a TA that your system works! 5. Remote control of an LED using an accelerometer and XBees For many applications of wireless communication, it is desirable to transmit a continuous, analog signal, such as data from an accelerometer or electromyograph (EMG). However, the XBee can only transmit and receive data in packets, where each packet is one byte, and one byte contains 8 bits (0 or 1) of information. (Note that in the previous part we were transmitting characters [designated by single quotes ], which only store one byte of information.) So how do we break up an analog signal (imagine a sine wave) into bytes? Well, we can sample the signal at regular time intervals to obtain the integer values that make up the signal. An integer stores 2 bytes of information, so it cannot be sent in this form through the serial port. Instead, integers are printed one byte at a time using ASCII characters corresponding to each digit. For example, if we were to transmit the number 4316 through the serial port, it would transmit the ASCII representations of 4, 3, 1, and 6 in series. These bytes can then be regrouped into an int on the receiving end, thus reconstructing the original integer. In this section, you will transmit integer values from an accelerometer and reconstruct them on the receiver. You will then use this data to control the brightness of an LED on the receiver. This is done using a technique pulse width modulation (PWM). For an good explanation of PWM, read the following reference page:

11 An easy way to implement PWM is by using the Arduino s analogwrite() function. - Note that this function only works on digital pins 3, 5, 6, 9, 10, and 11 (and has no connection to analogread() or the analog pins). By using the map() function from Lab 4, we can map the accelerometer values to a range of 0 to 255 (the range accepted by analogwrite()). Transmitter Module a. Connect an accelerometer to your transmitter module. b. Complete the following code so that the transmitter sends the y-axis value to the receiver every 250 seconds. Set the Arduino in USB mode and upload your code. const int groundpin = 18; const int powerpin = 19; const int ypin = 16; // analog input pin4 -- ground (GND) // analog input pin5 -- voltage (Vcc) // analog input pin2 -- y-axis pin int yvalue; void setup() { Serial.begin(9600); pinmode(ypin, INPUT); pinmode(groundpin, OUTPUT); pinmode(powerpin, OUTPUT); digitalwrite(groundpin, LOW); // make analog pin (4) equivalent to GND (ground) digitalwrite(powerpin, HIGH); // make analog pin (5) equivalent to Vcc (voltage source) void loop(){ // your code here c. Set the Transmitter Arduino in XBee mode by connecting the jumpers. d. Using the output on the serial monitor, determine the minimum and maximum y-axis values. 11

12 Receiver Module e. Construct the circuit given by the schematic in Figure 10. Figure 10: Receiver LED circuit f. Set the Arduino in USB Programming mode (remove jumpers) and copy the following code into the Arduino IDE window. int ymin = ***; int ymax = ***; // Replace with measured minimum yvalue // Replace with measured maximum yvalue int yval; // incoming y-axis value void setup() { Serial.begin(9600); void loop() { // insert code to reconstruct yval pwm = map(yval, ymin, ymax, 0, 255); analogwrite(9, pwm); g. Replace *** with the values that you found in part d. Finish writing the code to reconstruct the transmitted value from the accelerometer. Hint: look at Fragment #2 on page 4). h. Upload the finished code to the Arduino. i. Tilt the accelerometer on the transmitter and observe the LED brightness on the receiver. Demonstrate to a TA that your system works! 12

13 6. Thinking Further Biomedical Application With technology rapidly evolving, it is becoming possible for medical professionals to remotely observe and treat patients. This new form of medicine, called telemedicine, allows people in need of medical surveillance to move around comfortably at home while their physiological signals, such as heart rate, brain and muscle activity, etc., are wirelessly transmitted to a computer and sent to a medical center to be analyzed. Imagine a digital communication system consisting of two XBee modules (one transmitter and one receiver), two Arduinos, and a biomedical sensor such as an electrocardiograph (ECG), which records electrical currents associated with heart muscle activity (shown in Figure 9). The signal from the ECG is directly connected to the transmitter, which then wirelessly transmits the signal to the receiver. The data can then be transferred from the receiver onto a computer and sent to a medical center via an internet connection. With your group, briefly discuss the following: - What are some factors that might interfere with the quality of the transmitted signal? - Do you think that this could be an effective system for remote patient monitoring? - Could a similar type of system be used by a doctor to remotely treat a patient? Figure 8 - Electrocardiograph ( 13

Lab 6 Introduction to Serial and Wireless Communication

Lab 6 Introduction to Serial and Wireless Communication University of Pennsylvania Department of Electrical and Systems Engineering ESE 111 Intro to Elec/Comp/Sys Engineering Lab 6 Introduction to Serial and Wireless Communication Introduction: Up to this point,

More information

Microcontroller Programming Beginning with Arduino. Charlie Mooney

Microcontroller Programming Beginning with Arduino. Charlie Mooney Microcontroller Programming Beginning with Arduino Charlie Mooney Microcontrollers Tiny, self contained computers in an IC Often contain peripherals Different packages availible Vast array of size and

More information

Arduino Lesson 5. The Serial Monitor

Arduino Lesson 5. The Serial Monitor Arduino Lesson 5. The Serial Monitor Created by Simon Monk Last updated on 2013-06-22 08:00:27 PM EDT Guide Contents Guide Contents Overview The Serial Monitor Arduino Code Other Things to Do 2 3 4 7 10

More information

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

Theory and Practice of Tangible User Interfaces. Thursday Week 2: Digital Input and Output. week. Digital Input and Output. RGB LEDs fade with PWM week 02 Digital Input and Output RGB LEDs fade with PWM 1 Microcontrollers Output Transducers actuators (e.g., motors, buzzers) Arduino Input Transducers sensors (e.g., switches, levers, sliders, etc.)

More information

Basic Pulse Width Modulation

Basic Pulse Width Modulation EAS 199 Fall 211 Basic Pulse Width Modulation Gerald Recktenwald v: September 16, 211 gerry@me.pdx.edu 1 Basic PWM Properties Pulse Width Modulation or PWM is a technique for supplying electrical power

More information

Surveillance System Using Wireless Sensor Networks

Surveillance System Using Wireless Sensor Networks Surveillance System Using Wireless Sensor Networks Dan Nguyen, Leo Chang Computer Engineering, Santa Clara University Santa Clara, California, USA dantnguyen84@gmail.com chihshun@gmail.com Abstract The

More information

Computer Architectures

Computer Architectures Implementing the door lock with Arduino Gábor Horváth 2015. március 9. Budapest associate professor BUTE Dept. Of Networked Systems and Services ghorvath@hit.bme.hu Outline Aim of the lecture: To show

More information

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

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide Sensors LCD Real Time Clock/ Calendar DC Motors Buzzer LED dimming Relay control I2C-FLEXEL PS2 Keyboards Servo Motors IR Remote Control

More information

Arduino Lesson 13. DC Motors. Created by Simon Monk

Arduino Lesson 13. DC Motors. Created by Simon Monk Arduino Lesson 13. DC Motors Created by Simon Monk Guide Contents Guide Contents Overview Parts Part Qty Breadboard Layout Arduino Code Transistors Other Things to Do 2 3 4 4 4 6 7 9 11 Adafruit Industries

More information

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

Building a Basic Communication Network using XBee DigiMesh. Keywords: XBee, Networking, Zigbee, Digimesh, Mesh, Python, Smart Home Building a Basic Communication Network using XBee DigiMesh Jennifer Byford April 5, 2013 Keywords: XBee, Networking, Zigbee, Digimesh, Mesh, Python, Smart Home Abstract: Using Digi International s in-house

More information

Arduino Shield Manual

Arduino Shield Manual Arduino Shield Manual Version 1.4 www.dfrobot.com Copyright 2010 by DFRobot.com Table of Contents Arduino I/O Expansion Shield... 4 Introduction... 4 Diagram... 4 Sample Code... 4 Arduino Motor Shield...

More information

Arduino project. Arduino board. Serial transmission

Arduino project. Arduino board. Serial transmission Arduino project Arduino is an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board. Open source means that the

More information

H-Bridge Motor Control

H-Bridge Motor Control University of Pennsylvania Department of Electrical and Systems Engineering ESE 206: Electrical Circuits and Systems II Lab H-Bridge Motor Control Objective: The objectives of this lab are: 1. To construct

More information

Connecting Arduino to Processing a

Connecting Arduino to Processing a Connecting Arduino to Processing a learn.sparkfun.com tutorial Available online at: http://sfe.io/t69 Contents Introduction From Arduino......to Processing From Processing......to Arduino Shaking Hands

More information

IR Communication a learn.sparkfun.com tutorial

IR Communication a learn.sparkfun.com tutorial IR Communication a learn.sparkfun.com tutorial Available online at: http://sfe.io/t33 Contents Getting Started IR Communication Basics Hardware Setup Receiving IR Example Transmitting IR Example Resources

More information

Arduino Shield Manual

Arduino Shield Manual Arduino Shield Manual Version 1.5 www.dfrobot.com Copyright 2010 by DFRobot.com Table of Contents Table of Contents... 2 Arduino I/O Expansion Shield... 4 Introduction... 4 Diagram... 4 Sample Code...

More information

Arduino Lesson 16. Stepper Motors

Arduino Lesson 16. Stepper Motors Arduino Lesson 16. Stepper Motors Created by Simon Monk Last updated on 2013-11-22 07:45:14 AM EST Guide Contents Guide Contents Overview Parts Part Qty Breadboard Layout Arduino Code Stepper Motors Other

More information

Arduino Wifi shield And reciever. 5V adapter. Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the shield:

Arduino Wifi shield And reciever. 5V adapter. Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the shield: the following parts are needed to test the unit: Arduino UNO R3 Arduino Wifi shield And reciever 5V adapter Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the

More information

MeshBee Open Source ZigBee RF Module CookBook

MeshBee Open Source ZigBee RF Module CookBook MeshBee Open Source ZigBee RF Module CookBook 2014 Seeed Technology Inc. www.seeedstudio.com 1 Doc Version Date Author Remark v0.1 2014/05/07 Created 2 Table of contents Table of contents Chapter 1: Getting

More information

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

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board Abstract This application note is a tutorial of how to use an Arduino UNO microcontroller to

More information

Introduction to Arduino

Introduction to Arduino Introduction to Arduino // Basic Arduino reference sheet: Installation: Arduino: http://www.arduino.cc/en/guide/homepage Fritzing: http://fritzing.org/download/ Support: Arduino: http://www.arduino.cc,

More information

Web Site: www.parallax.com Forums: forums.parallax.com Sales: sales@parallax.com Technical: support@parallax.com

Web Site: www.parallax.com Forums: forums.parallax.com Sales: sales@parallax.com Technical: support@parallax.com Web Site: www.parallax.com Forums: forums.parallax.com Sales: sales@parallax.com Technical: support@parallax.com Office: (916) 624-8333 Fax: (916) 624-8003 Sales: (888) 512-1024 Tech Support: (888) 997-8267

More information

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

Your Multimeter. The Arduino Uno 10/1/2012. Using Your Arduino, Breadboard and Multimeter. EAS 199A Fall 2012. Work in teams of two! Using Your Arduino, Breadboard and Multimeter Work in teams of two! EAS 199A Fall 2012 pincer clips good for working with breadboard wiring (push these onto probes) Your Multimeter probes leads Turn knob

More information

Home Security System for Automatic Doors

Home Security System for Automatic Doors ABDUL S. RATTU Home Security System for Automatic Doors Capstone Design Project Final Report Spring 2013 School of Engineering The State University of New Jersey, USA May 1st, 2013 ECE 468 Advisor: Prof.

More information

Bidirectional wireless communication using EmbedRF

Bidirectional wireless communication using EmbedRF Bidirectional wireless communication using EmbedRF 1. Tools you will need for this application note... 2 2. Introduction... 3 3. Connect EmbedRF Board to USB Interface Board... 3 4. Install and Run EmbedRF

More information

Basic DC Motor Circuits. Living with the Lab Gerald Recktenwald Portland State University gerry@pdx.edu

Basic DC Motor Circuits. Living with the Lab Gerald Recktenwald Portland State University gerry@pdx.edu Basic DC Motor Circuits Living with the Lab Gerald Recktenwald Portland State University gerry@pdx.edu DC Motor Learning Objectives Explain the role of a snubber diode Describe how PWM controls DC motor

More information

Electronics 5: Arduino, PWM, Mosfetts and Motors

Electronics 5: Arduino, PWM, Mosfetts and Motors BIOE 123 Module 6 Electronics 5: Arduino, PWM, Mosfetts and Motors Lecture (30 min) Date Learning Goals Learn about pulse width modulation (PWM) as a control technique Learn how to use a Mosfets to control

More information

Basic DC Motor Circuits

Basic DC Motor Circuits Basic DC Motor Circuits Living with the Lab Gerald Recktenwald Portland State University gerry@pdx.edu DC Motor Learning Objectives Explain the role of a snubber diode Describe how PWM controls DC motor

More information

EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL

EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL The Serial Graph Tool for the Arduino Uno provides a simple interface for graphing data to the PC from the Uno. It can graph up

More information

Waspmote. Quickstart Guide

Waspmote. Quickstart Guide Waspmote Quickstart Guide Index Document version: v4.3-11/2014 Libelium Comunicaciones Distribuidas S.L. INDEX 1. Introduction... 3 2. General and safety information... 4 3. Waspmote s Hardware Setup...

More information

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

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard University April 13, 2016 About Arduino: The Board Variety of models of Arduino Board (I am using Arduino Uno) Microcontroller constructd similarly

More information

Arduino Lesson 1. Blink

Arduino Lesson 1. Blink Arduino Lesson 1. Blink Created by Simon Monk Last updated on 2015-01-15 09:45:38 PM EST Guide Contents Guide Contents Overview Parts Part Qty The 'L' LED Loading the 'Blink' Example Saving a Copy of 'Blink'

More information

Using Xbee 802.15.4 in Serial Communication

Using Xbee 802.15.4 in Serial Communication Using Xbee 802.15.4 in Serial Communication Jason Grimes April 2, 2010 Abstract Instances where wireless serial communication is required to connect devices, Xbee RF modules are effective in linking Universal

More information

Arduino Motor Shield (L298) Manual

Arduino Motor Shield (L298) Manual Arduino Motor Shield (L298) Manual This DFRobot L298 DC motor driver shield uses LG high power H-bridge driver Chip L298P, which is able to drive DC motor, two-phase or four phase stepper motor with a

More information

TUTORIAL FOR INITIALIZING BLUETOOTH COMMUNICATION BETWEEN ANDROID AND ARDUINO

TUTORIAL FOR INITIALIZING BLUETOOTH COMMUNICATION BETWEEN ANDROID AND ARDUINO TUTORIAL FOR INITIALIZING BLUETOOTH COMMUNICATION BETWEEN ANDROID AND ARDUINO some pre requirements by :-Lohit Jain *First of all download arduino software from www.arduino.cc *download software serial

More information

Single channel data transceiver module WIZ2-434

Single channel data transceiver module WIZ2-434 Single channel data transceiver module WIZ2-434 Available models: WIZ2-434-RS: data input by RS232 (±12V) logic, 9-15V supply WIZ2-434-RSB: same as above, but in a plastic shell. The WIZ2-434-x modules

More information

Arduino Lab 1 - The Voltage Divider

Arduino Lab 1 - The Voltage Divider Arduino Lab 1 - The Voltage Divider 1. Introduction In this lab, we will endanger a cute animal, create a portal to another dimension, and invent a new genre of music. Along the way, we will learn about

More information

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

1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows: LCD 1602 Shield Description: Arduino LCD 1602 adopts 2 lines with 16 characters LCD, with contrast regulating knob, backlight optional switch, and with 4 directional push-buttons, 1 choice button and1

More information

DEPARTMENT OF ELECTRONICS ENGINEERING

DEPARTMENT OF ELECTRONICS ENGINEERING UNIVERSITY OF MUMBAI A PROJECT REPORT ON Home Security Alarm System Using Arduino SUBMITTED BY- Suman Pandit Shakyanand Kamble Vinit Vasudevan (13103A0011) (13103A0012) (13103A0018) UNDER THE GUIDANCE

More information

Part Number Description Packages available

Part Number Description Packages available Features 3 digital I/O Serial Data output Connects directly to RF Modules Easy Enc / Dec Pairing Function Minimal External Components Required Performs all encoding/decoding of data for Reliable Operation.

More information

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

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver Electronics Exercise 2: The 555 Timer and its Applications Mechatronics Instructional Laboratory Woodruff School of Mechanical Engineering Georgia Institute of Technology Lab Director: I. Charles Ume,

More information

Lab Experiment 1: The LPC 2148 Education Board

Lab Experiment 1: The LPC 2148 Education Board Lab Experiment 1: The LPC 2148 Education Board 1 Introduction The aim of this course ECE 425L is to help you understand and utilize the functionalities of ARM7TDMI LPC2148 microcontroller. To do that,

More information

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Using Arduino Microcontrollers to Sense DC Motor Speed and Position ECE480 Design Team 3 Using Arduino Microcontrollers to Sense DC Motor Speed and Position Tom Manner April 4, 2011 page 1 of 7 Table of Contents 1. Introduction ----------------------------------------------------------

More information

Embedded Systems Design Course Applying the mbed microcontroller

Embedded Systems Design Course Applying the mbed microcontroller Embedded Systems Design Course Applying the mbed microcontroller Serial communications with SPI These course notes are written by R.Toulson (Anglia Ruskin University) and T.Wilmshurst (University of Derby).

More information

Remote control circuitry via mobile phones and SMS

Remote control circuitry via mobile phones and SMS Remote control circuitry via mobile phones and SMS Gunther Zielosko 1. Introduction In application note No. 56 ( BASIC-Tiger sends text messages, in which we described a BASIC-Tiger sending text messages

More information

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

Arduino Internet Connectivity: Maintenance Manual Julian Ryan Draft No. 7 April 24, 2015 Arduino Internet Connectivity: Maintenance Manual Julian Ryan Draft No. 7 April 24, 2015 CEN 4935 Senior Software Engineering Project Instructor: Dr. Janusz Zalewski Software Engineering Program Florida

More information

Lecture 7: Programming for the Arduino

Lecture 7: Programming for the Arduino Lecture 7: Programming for the Arduino - The hardware - The programming environment - Binary world, from Assembler to C - - Programming C for the Arduino: more - Programming style Lect7-Page1 The hardware

More information

Servo Motor API nxt_motor_get_count nxt_motor_set_count nxt_motor_set_speed

Servo Motor API nxt_motor_get_count nxt_motor_set_count nxt_motor_set_speed Servo Motor API int nxt_motor_get_count(u32 n) gets Servo Motor revolution count in degree. n: NXT_PORT_A, NXT_PORT_B, NXT_PORT_C Servo Motors revolution in degree void nxt_motor_set_count(u32 n, int count)

More information

2013 G Miller. 3 Axis Brushless Gimbal Controller Manual

2013 G Miller. 3 Axis Brushless Gimbal Controller Manual 2013 G Miller 3 Axis Brushless Gimbal Controller Manual P a g e 2 When you receive your 3 axis controller board from dys.hk in the packet will be the following items the sensor 3rd Axis board the main

More information

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester Leonardo Journal of Sciences ISSN 1583-0233 Issue 20, January-June 2012 p. 31-36 Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester Ganesh Sunil NHIVEKAR *, and Ravidra Ramchandra MUDHOLKAR

More information

Introduction to Arduino

Introduction to Arduino 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

More information

Ultrasonic Distance Measurement Module

Ultrasonic Distance Measurement Module Ultrasonic Distance Measurement Module General Description Distance measurement sensor is a low cost full functionality solution for distance measurement applications. The module is based on the measurement

More information

Electronic Brick of Current Sensor

Electronic Brick of Current Sensor Electronic Brick of Current Sensor Overview What is an electronic brick? An electronic brick is an electronic module which can be assembled like Lego bricks simply by plugging in and pulling out. Compared

More information

ZX-NUNCHUK (#8000339)

ZX-NUNCHUK (#8000339) ZX-NUNCHUK documentation 1 ZX-NUNCHUK (#8000339) Wii-Nunchuk interface board 1. Features l Interface with Wii Nunchuk remote control directly. Modification the remote control is not required. l Two-wire

More information

RDF1. RF Receiver Decoder. Features. Applications. Description. Ordering Information. Part Number Description Packages available

RDF1. RF Receiver Decoder. Features. Applications. Description. Ordering Information. Part Number Description Packages available RDF1 RF Receiver Decoder Features Complete FM Receiver and Decoder. Small Form Factor Range up to 200 Metres* Easy Learn Transmitter Feature. Learns 40 transmitter Switches 4 Digital and 1 Serial Data

More information

BLUETOOTH SERIAL PORT PROFILE. iwrap APPLICATION NOTE

BLUETOOTH SERIAL PORT PROFILE. iwrap APPLICATION NOTE BLUETOOTH SERIAL PORT PROFILE iwrap APPLICATION NOTE Thursday, 19 April 2012 Version 1.2 Copyright 2000-2012 Bluegiga Technologies All rights reserved. Bluegiga Technologies assumes no responsibility for

More information

ETEC 421 - Digital Controls PIC Lab 10 Pulse Width Modulation

ETEC 421 - Digital Controls PIC Lab 10 Pulse Width Modulation ETEC 421 - Digital Controls PIC Lab 10 Pulse Width Modulation Program Definition: Write a program to control the speed of a dc motor using pulse width modulation. Discussion: The speed of a dc motor is

More information

Wireless Communication With Arduino

Wireless Communication With Arduino Wireless Communication With Arduino Using the RN-XV to communicate over WiFi Seth Hardy shardy@asymptotic.ca Last Updated: Nov 2012 Overview Radio: Roving Networks RN-XV XBee replacement : fits in the

More information

Arduino Lesson 14. Servo Motors

Arduino Lesson 14. Servo Motors Arduino Lesson 14. Servo Motors Created by Simon Monk Last updated on 2013-06-11 08:16:06 PM EDT Guide Contents Guide Contents Overview Parts Part Qty The Breadboard Layout for 'Sweep' If the Servo Misbehaves

More information

Lab 3 Microcontroller programming Interfacing to Sensors and Actuators with irobot

Lab 3 Microcontroller programming Interfacing to Sensors and Actuators with irobot 1. Objective Lab 3 Microcontroller programming Interfacing to Sensors and Actuators with irobot In this lab, you will: i. Become familiar with the irobot and AVR tools. ii. Understand how to program a

More information

Wireless Security Camera

Wireless Security Camera Wireless Security Camera Technical Manual 12/14/2001 Table of Contents Page 1.Overview 3 2. Camera Side 4 1.Camera 5 2. Motion Sensor 5 3. PIC 5 4. Transmitter 5 5. Power 6 3. Computer Side 7 1.Receiver

More information

Experiments: Labview and RS232

Experiments: Labview and RS232 Experiments: Labview and RS232 September 2013 Dušan Ponikvar Faculty of Mathematics and Physics Jadranska 19, Ljubljana, Slovenia There are many standards describing the connection between a PC and a microcontroller

More information

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

The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications Joshua Ellul jellul@imperial.ac.uk Overview Brief introduction to Body Sensor Networks BSN Hardware

More information

Wireless Security Camera with the Arduino Yun

Wireless Security Camera with the Arduino Yun Wireless Security Camera with the Arduino Yun Created by Marc-Olivier Schwartz Last updated on 2014-08-13 08:30:11 AM EDT Guide Contents Guide Contents Introduction Connections Setting up your Temboo &

More information

Arduino DUE + DAC MCP4922 (SPI)

Arduino DUE + DAC MCP4922 (SPI) Arduino DUE + DAC MCP4922 (SPI) v101 In this document it will described how to connect and let a Digital/Analog convert work with an Arduino DUE. The big difference between and Arduino DUE and other Arduinos

More information

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

Servo Motors (SensorDAQ only) Evaluation copy. Vernier Digital Control Unit (DCU) LabQuest or LabPro power supply Servo Motors (SensorDAQ only) Project 7 Servos are small, relatively inexpensive motors known for their ability to provide a large torque or turning force. They draw current proportional to the mechanical

More information

CENTRONICS interface and Parallel Printer Port LPT

CENTRONICS interface and Parallel Printer Port LPT Course on BASCOM 8051 - (37) Theoretic/Practical course on BASCOM 8051 Programming. Author: DAMINO Salvatore. CENTRONICS interface and Parallel Printer Port LPT The Parallel Port, well known as LPT from

More information

Bluetooth for device discovery. Networking Guide

Bluetooth for device discovery. Networking Guide Bluetooth for device discovery Networking Guide Index Document Version: v4.4-11/2014 Libelium Comunicaciones Distribuidas S.L. INDEX 1. Introduction... 3 1.1. General description...3 2. Hardware... 5 2.1.

More information

RS-232 Communications Using BobCAD-CAM. RS-232 Introduction

RS-232 Communications Using BobCAD-CAM. RS-232 Introduction RS-232 Introduction Rs-232 is a method used for transferring programs to and from the CNC machine controller using a serial cable. BobCAD-CAM includes software for both sending and receiving and running

More information

Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module

Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module RS0 Microcontroller LEDs Motor Control Pushbuttons Purpose: To demonstrate an easy way of using a Freescale RS0K2 microcontroller

More information

Intro to Intel Galileo - IoT Apps GERARDO CARMONA

Intro to Intel Galileo - IoT Apps GERARDO CARMONA Intro to Intel Galileo - IoT Apps GERARDO CARMONA IRVING LLAMAS Welcome! Campus Party Guadalajara 2015 Introduction In this course we will focus on how to get started with the Intel Galileo Gen 2 development

More information

Programming the Arduino

Programming the Arduino Summer University 2015: Programming the Arduino Alexander Neidhardt (FESG) neidhardt@fs.wettzell.de SU-Arduino-Prog-Page1 Programming the Arduino - The hardware - The programming environment - Binary world,

More information

Firmware version: 1.10 Issue: 7 AUTODIALER GD30.2. Instruction Manual

Firmware version: 1.10 Issue: 7 AUTODIALER GD30.2. Instruction Manual Firmware version: 1.10 Issue: 7 AUTODIALER GD30.2 Instruction Manual Firmware version: 2.0.1 Issue: 0.6 Version of the GPRS transmitters configurator: 1.3.6.3 Date of issue: 07.03.2012 TABLE OF CONTENTS

More information

C4DI Arduino tutorial 4 Things beginning with the letter i

C4DI Arduino tutorial 4 Things beginning with the letter i C4DI Arduino tutorial 4 Things beginning with the letter i If you haven t completed the first three tutorials, it might be wise to do that before attempting this one. This tutorial assumes you are using

More information

AirCasting Particle Monitor Bill of Materials

AirCasting Particle Monitor Bill of Materials AirCasting Particle Monitor Bill of Materials Shinyei PPD42NS Seeed http://www.seeedstudio.com/depot/grove- dust- sensor- p- 1050.html?cPath=25_27 JY- MCU HC- 06 Bluetooth Wireless Serial Port Module FastTech

More information

Chapter 4: Pulse Width Modulation

Chapter 4: Pulse Width Modulation Pulse Width Modulation Page 127 Chapter 4: Pulse Width Modulation PULSES FOR COMMUNICATION AND CONTROL Pulse width modulation is abbreviated PWM, and it refers to a technique of varying the amount of time

More information

WA Manager Alarming System Management Software Windows 98, NT, XP, 2000 User Guide

WA Manager Alarming System Management Software Windows 98, NT, XP, 2000 User Guide WA Manager Alarming System Management Software Windows 98, NT, XP, 2000 User Guide Version 2.1, 4/2010 Disclaimer While every effort has been made to ensure that the information in this guide is accurate

More information

Arduino Microcontroller Guide W. Durfee, University of Minnesota ver. oct-2011 Available on-line at www.me.umn.edu/courses/me2011/arduino/

Arduino Microcontroller Guide W. Durfee, University of Minnesota ver. oct-2011 Available on-line at www.me.umn.edu/courses/me2011/arduino/ Arduino Microcontroller Guide W. Durfee, University of Minnesota ver. oct-2011 Available on-line at www.me.umn.edu/courses/me2011/arduino/ 1 Introduction 1.1 Overview The Arduino microcontroller is an

More information

How to Move Canon EF Lenses. Yosuke Bando

How to Move Canon EF Lenses. Yosuke Bando How to Move Canon EF Lenses Yosuke Bando Preface This instruction is intended to be helpful to those who are interested in making modifications to camera lenses to explore/reproduce focus sweep, focal

More information

Massachusetts Institute of Technology

Massachusetts Institute of Technology Objectives Massachusetts Institute of Technology Robotics: Science and Systems I Lab 1: System Overview and Introduction to the µorcboard Distributed: February 4, 2015, 3:30pm Checkoffs due: February 9,

More information

F2103 GPRS DTU USER MANUAL

F2103 GPRS DTU USER MANUAL F2103 GPRS DTU USER MANUAL Add:J1-J2,3rd Floor,No.44,GuanRi Road,SoftWare Park,XiaMen,China 1 Zip Code:361008 Contents Chapter 1 Brief Introduction of Product... 3 1.1 General... 3 1.2 Product Features...

More information

CanSat Program. Stensat Group LLC

CanSat Program. Stensat Group LLC CanSat Program Stensat Group LLC 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 Lander kit against

More information

www.dragino.com Yun Shield Quick Start Guide VERSION: 1.0 Version Description Date 1.0 Release 2014-Jul-08 Yun Shield Quick Start Guide 1 / 14

www.dragino.com Yun Shield Quick Start Guide VERSION: 1.0 Version Description Date 1.0 Release 2014-Jul-08 Yun Shield Quick Start Guide 1 / 14 Yun Shield Quick Start Guide VERSION: 1.0 Version Description Date 1.0 Release 2014-Jul-08 Yun Shield Quick Start Guide 1 / 14 Index: 1 Introduction... 3 1.1 About this quick start guide... 3 1.2 What

More information

Copyright is owned by the Author of the thesis. Permission is given for a copy to be downloaded by an individual for the purpose of research and

Copyright is owned by the Author of the thesis. Permission is given for a copy to be downloaded by an individual for the purpose of research and Copyright is owned by the Author of the thesis. Permission is given for a copy to be downloaded by an individual for the purpose of research and private study only. The thesis may not be reproduced elsewhere

More information

Lab 2.0 Thermal Camera Interface

Lab 2.0 Thermal Camera Interface Lab 2.0 Thermal Camera Interface Lab 1 - Camera directional-stand (recap) The goal of the lab 1 series was to use a PS2 joystick to control the movement of a pan-tilt module. To this end, you implemented

More information

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual. 14.10.2010 HAW - Arduino 1

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual. 14.10.2010 HAW - Arduino 1 The I2C Bus Introduction The I2C-bus is a de facto world standard that is now implemented in over 1000 different ICs manufactured by more than 50 companies. Additionally, the versatile I2C-bus is used

More information

Arduino Lesson 4. Eight LEDs and a Shift Register

Arduino Lesson 4. Eight LEDs and a Shift Register Arduino Lesson 4. Eight LEDs and a Shift Register Created by Simon Monk Last updated on 2014-09-01 11:30:10 AM EDT Guide Contents Guide Contents Overview Parts Part Qty Breadboard Layout The 74HC595 Shift

More information

Using the AnyBus -X Gateway to Communicate between a DVT camera and a Profibus Master

Using the AnyBus -X Gateway to Communicate between a DVT camera and a Profibus Master Using the AnyBus -X Gateway to Communicate between a DVT camera and a Profibus Master Page 1 of 13 Table of Contents 1 OVERVIEW... 3 2 INSTALLING AND CONFIGURING THE ANYBUS -X GENERIC GATEWAY AND ETHERNET

More information

DS1307 Real Time Clock Breakout Board Kit

DS1307 Real Time Clock Breakout Board Kit DS1307 Real Time Clock Breakout Board Kit Created by Tyler Cooper Last updated on 2015-10-15 11:00:14 AM EDT Guide Contents Guide Contents Overview What is an RTC? Parts List Assembly Arduino Library Wiring

More information

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

ESP 8266: A BREAKTHROUGH IN WIRELESS SENSOR NETWORKS AND INTERNET OF THINGS International Journal of Electronics and Communication Engineering & Technology (IJECET) Volume 6, Issue 8, Aug 2015, pp. 07-11, Article ID: IJECET_06_08_002 Available online at http://www.iaeme.com/ijecetissues.asp?jtypeijecet&vtype=6&itype=8

More information

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

Three Arduino Challenges to Connect the Logical World with the Physical One. ISTE 2015 -- Philadelphia Three Arduino Challenges to Connect the Logical World with the Physical One ISTE 2015 -- Philadelphia Rachel Brusky (bruskr@d-e.org) Christopher Fleischl (fleisc@d-e.org) Trevor Shaw (shawt@d-e.org) Dwight-Englewood

More information

Modbus and ION Technology

Modbus and ION Technology 70072-0104-14 TECHNICAL 06/2009 Modbus and ION Technology Modicon Modbus is a communications protocol widely used in process control industries such as manufacturing. PowerLogic ION meters are compatible

More information

Adding Heart to Your Technology

Adding Heart to Your Technology RMCM-01 Heart Rate Receiver Component Product code #: 39025074 KEY FEATURES High Filtering Unit Designed to work well on constant noise fields SMD component: To be installed as a standard component to

More information

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware A+ Guide to Managing and Maintaining Your PC, 7e Chapter 1 Introducing Hardware Objectives Learn that a computer requires both hardware and software to work Learn about the many different hardware components

More information

EDK 350 (868 MHz) EDK 350U (902 MHz) EnOcean Developer Kit

EDK 350 (868 MHz) EDK 350U (902 MHz) EnOcean Developer Kit EDK 350 (868 MHz) EDK 350U (902 MHz) EnOcean Developer Kit EDK 350 User Manual Important Notes This information describes the type of component and shall not be considered as assured characteristics. No

More information

Table 1 below is a complete list of MPTH commands with descriptions. Table 1 : MPTH Commands. Command Name Code Setting Value Description

Table 1 below is a complete list of MPTH commands with descriptions. Table 1 : MPTH Commands. Command Name Code Setting Value Description MPTH: Commands Table 1 below is a complete list of MPTH commands with descriptions. Note: Commands are three bytes long, Command Start Byte (default is 128), Command Code, Setting value. Table 1 : MPTH

More information

VirtualWire. Copyright (C) 2008-2009 Mike McCauley. 1.0 Introduction. 2.0 Overview

VirtualWire. Copyright (C) 2008-2009 Mike McCauley. 1.0 Introduction. 2.0 Overview April 1, 2009 VirtualWire Copyright (C) 2008-2009 Mike McCauley Documentation for the VirtualWire 1.3 communications library for Arduino. 1.0 Introduction Arduino is a low cost microcontroller with Open

More information

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures Chapter 02: Computer Organization Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures Objective: Understand the IO Subsystem and Understand Bus Structures Understand

More information

E-Blocks Easy Internet Bundle

E-Blocks Easy Internet Bundle Page 1 Cover Page Page 2 Flowcode Installing Flowcode Instruction for installing Flowcode can be found inside the installation booklet located inside the Flowcode DVD case. Before starting with the course

More information

MCP4725 Digital to Analog Converter Hookup Guide

MCP4725 Digital to Analog Converter Hookup Guide Page 1 of 9 MCP4725 Digital to Analog Converter Hookup Guide CONTRIBUTORS: JOELEB To DAC, or Not to DAC... When learning about the world of microcontrollers, you will come across analog-to-digital converters

More information