University of Portland EE 271 Electrical Circuits Laboratory. Experiment: Arduino

Size: px
Start display at page:

Download "University of Portland EE 271 Electrical Circuits Laboratory. Experiment: Arduino"

Transcription

1 University of Portland EE 271 Electrical Circuits Laboratory Experiment: Arduino I. Objective The objective of this experiment is to learn how to use the Arduino microcontroller to monitor switches and sensors and to activate devices such as LEDs or a speaker when the sensor output is a given value. II. List of Needed Components This experiment requires the following components: Two 1 kω resistors One 100 kω potentiometer One Arduino Uno One USB cable III. Background The Arduino is a microcontroller board that can be programmed to read switches and sensors and activate lights, speakers, motors, and other devices. Microcontrollers are used in a wide variety of devices such as cars, cell phones, cameras, appliances, printers, etc. Among their many uses, microcontrollers can be programmed to monitor a sensor and to activate some kind of output device when a given condition occurs. In a motion controlled light, for example, a microcontroller might turn a light on after a motion detector senses movement, and turn the light off after a given amount of time. Microcontrollers are often used to monitor sensors and control motors or other actuators in robots, quadcopters, etc. The Arduino website ( has details of what an Arduino Uno is and how to program it. In particular, if you want to download the Arduino software for free, click on Software. For technical details for the Arduino Uno board, click on Products, Arduino, and then click on Uno. To learn more about programming the Arduino, click on Learning, Reference. There are also tutorials, a forum, a list of Arduino projects, etc. No prior programming experience is necessary to complete this lab. University of Portland - p. 1 of 9 - Exp - Arduino.docx

2 IV. Prelab Assignment 1. What does the Arduino command pinmode do? 2. What does the Arduino command digitalwrite do? 3. What does the Arduino command digitalread do? 4. What does the Arduino command analogread do? V. Procedure Part 1: Arduino Set Up In this part of the experiment, we will use an existing sketch to blink an LED on and off. The Arduino microcontroller is programmed using free Arduino software which is a text editor that allows you to write programs, which are called sketches (see Figure 1). Figure 1: Arduino Software Connect the Arduino board to the computer using the USB cable first, and then open the Arduino software. The Arduino software comes with several example sketches. Open the example sketch called Blink by clicking on File, Examples, 01.Basics, Blink. The Blink sketch will open in a new Arduino window. University of Portland - p. 2 of 9 - Exp - Arduino.docx

3 Configure the software for the Arduino Uno board by clicking on Tools, Board, and select Arduino/Genuino Uno. Also click on Tools, Port, and select the port with Arduino/Genuino Uno. If there are not any ports labeled Arduino/Genuino Uno, try unplugging the Arduino from the computer and plugging it in again. Click on the Upload Button (see Figure 1), which will compile, upload, and run the sketch. When the process is complete, the LED near pin 13 should repeatedly turn on for 1 second, then off for 1 second. If you get an error such as Problem uploading to board, click on Tools, Port, and select another port. Part 2: Blink Sketch Let s examine the Blink sketch and modify it to blink in a pattern of your choice. The Arduino board is programmed using the computer language C++, but the Arduino software includes several features that make it possible to write sketches without knowing C++ in detail. The text at the top of the Blink sketch is a comment. Comments are used to document the sketch for the benefit of people who read or modify it, but comments are ignored by the Arduino software. There are two ways to mark text as a comment. If a line contains the characters //, then the rest of the line is considered a comment. Also, all the text between the characters /* and */ is a comment. The setup function is used to initialize the sketch. It is executed only once when the Arduino board is first powered up or when it is reset using the reset button. The Arduino Uno has 14 general purpose input/output (I/0) pins which can be configured to be either inputs or outputs. Pin 13 is connected to an LED on the Arduino board, and the command pinmode(led_builtin, OUTPUT) sets pin 13 so that it functions as an output because the value of LED_BUILTIN is set to 13 by the Arduino software. Any pin can be set to an output by replacing LED_BUILTIN with the pin number. Any pin can be set to an input by replacing OUTPUT with INPUT. Note that there needs to be a semicolon ; after each command, and the commands inside a function are enclosed in curvy brackets and. After the setup function is complete, the loop function is called repeatedly until the Arduino is either powered down or reset. In this sketch, the command digitalwrite(led_builtin, HIGH) is used to set Pin 13 to HIGH, which causes the pin to output +5V and turn on the LED. Any pin can be set to HIGH by replacing LED_BUILTIN with the pin number. The delay(1000) command causes a 1000 ms (or 1 second) pause. The command digitalwrite(led_builtin, LOW) sets Pin 13 to 0V, which turns the LED off. Then, after another 1000 ms pause, the loop function is called again, repeating the process. University of Portland - p. 3 of 9 - Exp - Arduino.docx

4 Part 3: Blink LEDs Construct the circuit shown in Figure 2. Make sure you connect the center connector (Pin 2) of the potentiometer to Arduino Pin A0 (see Figures 3 and 4). The Debounced Pushbutton is connected to ground internally, so you do NOT need to make that connection yourself. Also, note that the Arduino pin marked 5V is a power supply generated on the Arduino board that we are using to supply power for this experiment, so do NOT connect the bench supply or the Proto-board supply to the Arduino! Figure 2: Arduino Circuit University of Portland - p. 4 of 9 - Exp - Arduino.docx

5 Figure 3: Arduino Pins Figure 4: Pinout of Potentiometer Turn on the power to the Proto-board (otherwise the Debounce Pushbutton circuit won t work). In the Logic Indicator section on the Proto-board, there is a switch labeled 5V/+V; set this switch to 5V. There is also a switch labeled TTL/CMOS; set this switch to TTL. Test your circuit by using the DMM to measure the voltage that is connected to Arduino Pin 2. It should be 0 V when the button is not pressed, and 5V when the button is pressed. The voltage that is connected to Arduino Pin A0 should vary between 0 and 5V as the knob on the potentiometer is turned. Note that the Arduino input pins should never be connected to a voltage that is larger than 5V or less than 0V, because that could damage the Arduino. Save a copy of the Blink sketch in your P: drive by clicking on File, Save As. Then modify the sketch to make the four Logic Indicator LEDs blink in a pattern of your choice. Save your sketch to your P: drive. Part 4: Read a Digital Input In this part, we will examine an example sketch that reads a digital input. This sketch could also be used to monitor any sensor, such as a motion detector, that has a digital output. Open the example sketch called DigitalReadSerial by clicking on File, Examples, 01.Basics, DigitalReadSerial. Compile, upload, and run the sketch by clicking on the Upload button. Then click on the Serial Monitor button (see Figure 1). The sketch should print 0 to the Serial Monitor when the button is not pressed, and 1 when the button is pressed. Let s examine the DigitalReadSerial sketch. The command int pushbutton = 2 creates a variable called pushbutton and sets its value to 2. This variable is type int, which means that it can only store integer values. Variables that are defined outside of a function are global, which means that they can be used in any of the functions. The University of Portland - p. 5 of 9 - Exp - Arduino.docx

6 purpose of this variable is to store the number of the input pin to which the pushbutton switch is connected. In the setup function, the command Serial.begin(9600) initializes a serial connection (one bit at a time) with the computer that will transfer data at 9600 bits per second. This command is necessary if the sketch prints out any values. The pinmode(pushbutton, INPUT) command initializes Pin 2 as an input. (When the Arduino powers up, it automatically sets the I/O pins to inputs, so this command is not actually necessary.) In the loop function, the command int buttonstate = digitalread(pushbutton) creates an integer variable called buttonstate. Variables that are defined inside a function are private to that function, which means that the variable is only available to commands that are also inside that function. The function digitalread reads the value from Pin 2 and stores the result in the variable buttonstate. If the voltage on the input pin is near 5V, then the function digitalread returns the value 1, otherwise it returns 0. The command Serial.println(buttonState) prints the value of the variable buttonstate to the Serial Monitor. The delay(1) command causes a 1 ms delay. The loop function is repeatedly called until power is shut off or the Arduino is reset. Save a copy of the DigitalReadSerial sketch in your P: drive by clicking on File, Save As. Let s modify the sketch so that it does something different depending if the switch is pressed or not. Add the following lines inside the loop function after the line with digitalread : if (buttonstate == 0) // if switch is not pressed (note there are two equal signs) digitalwrite(13, LOW); // turn LED off else digitalwrite(13, HIGH); // turn LED on Try out the above modification. The LED connected to Pin 13 should be off when the switch is not pressed and on when the switch is pressed. Modify the sketch so that it blinks the LEDs in two different patterns depending on if the switch is pressed or not. Save your sketch to your P: drive. Checkpoint 1: Demonstrate your sketch to the instructor. University of Portland - p. 6 of 9 - Exp - Arduino.docx

7 Part 5: Read an Analog Input In this part, we will examine a sketch that reads an analog input voltage from a potentiometer. This sketch could also be used to monitor any sensor, such as an RTD, photosensor, etc., that has an analog output. Open the example sketch called AnalogReadSerial by clicking on File, Examples, 01.Basics, AnalogReadSerial. Click on the Upload button and then click on the Serial Monitor button (see Figure 1). As you turn the potentiometer knob, the voltage Vi in Figure 2 should vary between 0 and 5V, and the printed values should also vary. Determine the relationship between the voltage Vi and the values printed in the Serial Monitor. The AnalogReadSerial sketch initializes the serial connection to the computer to 9600 bits per second in the setup function. In the loop function, the sketch uses the analogread command to read the analog voltage from pin A0, which means that it converts the voltage on pin A0 to an integer. The integer value is stored in the variable sensorvalue. The value of the variable sensorvalue is printed to the Serial Monitor followed by a 1 ms delay. Save a copy of the AnalogReadSerial sketch in your P: drive by clicking on File, Save As. Then modify the sketch to convert the value that is returned from the analogread function to volts, and then print out the value in volts. In order to store the value in volts, you will need an additional variable that can store floating point numbers, so instead of using type int, use type float. Also, when you compute the voltage, you will need to tell the Arduino to use floating point arithmetic by using constants with decimal points like 5.0 and instead of 5 and Run your sketch and record the voltage Vi and the voltage computed by your program (see Table 1). Also compute the percent error. Save your sketch to your P: drive. Table 1: Potentiometer Voltage Versus Computed Voltage Potentiometer Voltage Vo Computed Voltage (from Serial Monitor) % Error University of Portland - p. 7 of 9 - Exp - Arduino.docx

8 Part 6: Making Tones In this part, we will write a sketch that generates tones with a speaker. Start a new sketch by clicking on File, New. Then type (or paste) the following sketch into the Arduino software. /* * Generate Tones */ int speakerpin = 3; // pin connected to the speaker void setup() // put your setup code here, to run once: pinmode(speakerpin, OUTPUT); // set speakerpin to output void loop() // put your main code here, to run repeatedly: int i; // loop counter int frequency = 500; // frequency in Hz int duration = 250; // duration in ms int shortdelay = 500; // short delay time in ms for (i = 0; i < 3; i++) // generate tone tone(speakerpin, frequency, duration); delay(shortdelay); // short delay delay(5000); // long delay Run the sketch. If the tones are too quiet, change the 1 kω resistor that is in series with the speaker to 150 Ω. Do NOT decrease the resistance below 150Ω because that could damage the Arduino. The first argument to the tone function is the pin number that is connected to the speaker, the second is the frequency of the tone in Hz, and the third is the duration of the tone in ms. The for command, which is also called a for loop, causes the tone and delay functions to be repeated three times. The for command has three has three commands in parentheses. The first command i = 0 is executed only once when the loop begins. It is used to initialize the loop counter. The second command i < 3 is a test, and if the test is true, then the statements enclosed in the parentheses are executed. Then the third command i++ is executed, which in this case increments the value of the loop counter by 1. This process repeats until the test fails, and then the sketch skips down to the commands after the loop. University of Portland - p. 8 of 9 - Exp - Arduino.docx

9 Therefore, for command is equivalent to the following commands: i = 0; // initialize counter variable (this command is executed only once) i < 3; // this test is true, so do the loop commands tone(speakerpin, frequency, duration); // generate tone delay(delaytime); // delay i++; // increment loop counter, so now i equals 1 i < 3; // this test is true, so do the loop commands tone(speakerpin, frequency, duration); // generate tone delay(delaytime); // delay i++; // increment loop counter, so now i equals 2 i < 3; // this test is true, so do the loop commands tone(speakerpin, frequency, duration); // generate tone delay(delaytime); // delay i++; // increment loop counter, so now i equals 3 i < 3; // this test is now false, so skip down to the commands after the loop Connect the oscilloscope to Arduino Pin 3 and measure the period of the tones. Make a sketch of the oscilloscope display and label the period and the maximum and minimum voltages. Then compute the fundamental frequency and the percent error compared to the frequency that was specified in the tone command. Modify the sketch to play tones of your choice. Save your sketch. Part 7: Explore Write a sketch to monitor a switch, potentiometer, or sensor and use that input to activate LEDs and/or the speaker in some way. VI. Conclusion Write a paragraph that summarizes what you have learned in this lab. What is an Arduino? What types of tasks can an Arduino be used for? How is an analog voltage represented? Checkpoint 2: Show your conclusion and demonstrate your sketch from Part 7 to the instructor. University of Portland - p. 9 of 9 - Exp - Arduino.docx

Arduino - DigitalReadSerial

Arduino - DigitalReadSerial arduino.cc Arduino - DigitalReadSerial 5-6 minutes Digital Read Serial This example shows you how to monitor the state of a switch by establishing serial communication between your Arduino or Genuino and

More information

Procedure: Determine the polarity of the LED. Use the following image to help:

Procedure: Determine the polarity of the LED. Use the following image to help: Section 2: Lab Activity Section 2.1 Getting started: LED Blink Purpose: To understand how to upload a program to the Arduino and to understand the function of each line of code in a simple program. This

More information

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE, IME-100 ECE Lab 3 Electrical and Computer Engineering Department Kettering University 3-1 1. Laboratory Computers Getting Started i. Log-in with User Name: Kettering Student (no password required) ii.

More information

Adapted from a lab originally written by Simon Hastings and Bill Ashmanskas

Adapted from a lab originally written by Simon Hastings and Bill Ashmanskas Physics 364 Arduino Lab 1 Adapted from a lab originally written by Simon Hastings and Bill Ashmanskas Vithayathil/Kroll Introduction Last revised: 2014-11-12 This lab introduces you to an electronic development

More information

Serial.begin ( ); Serial.println( ); analogread ( ); map ( );

Serial.begin ( ); Serial.println( ); analogread ( ); map ( ); Control and Serial.begin ( ); Serial.println( ); analogread ( ); map ( ); A system output can be changed through the use of knobs, motion, or environmental conditions. Many electronic systems in our world

More information

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process Lab 01 Arduino 程式設計實驗 Essential Arduino Programming and Digital Signal Process Arduino Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's

More information

Robotics/Electronics Review for the Final Exam

Robotics/Electronics Review for the Final Exam Robotics/Electronics Review for the Final Exam Unit 1 Review. 1. The battery is 12V, R1 is 400 ohms, and the current through R1 is 20 ma. How many ohms is R2? ohms What is the voltage drop across R1? V

More information

Arduino 101 AN INTRODUCTION TO ARDUINO BY WOMEN IN ENGINEERING FT T I NA A ND AW E S O ME ME NTO R S

Arduino 101 AN INTRODUCTION TO ARDUINO BY WOMEN IN ENGINEERING FT T I NA A ND AW E S O ME ME NTO R S Arduino 101 AN INTRODUCTION TO ARDUINO BY WOMEN IN ENGINEERING FT T I NA A ND AW E S O ME ME NTO R S Overview Motivation Circuit Design and Arduino Architecture Projects Blink the LED Switch Night Lamp

More information

Introduction to Arduino

Introduction to Arduino Introduction to Arduino Paco Abad May 20 th, 2011 WGM #21 Outline What is Arduino? Where to start Types Shields Alternatives Know your board Installing and using the IDE Digital output Serial communication

More information

IME-100 ECE. Lab 4. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

IME-100 ECE. Lab 4. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE, IME-100 ECE Lab 4 Electrical and Computer Engineering Department Kettering University 4-1 1. Laboratory Computers Getting Started i. Log-in with User Name: Kettering Student (no password required) ii.

More information

Counter & LED (LED Blink)

Counter & LED (LED Blink) 1 T.R.E. Meeting #1 Counter & LED (LED Blink) September 17, 2017 Contact Info for Today s Lesson: President Ryan Muller mullerr@vt.edu 610-573-1890 Learning Objectives: Learn how to use the basics of Arduino

More information

BASIC ARDUINO WORKSHOP. Mr. Aldwin and Mr. Bernardo

BASIC ARDUINO WORKSHOP. Mr. Aldwin and Mr. Bernardo BASIC ARDUINO WORKSHOP Mr. Aldwin and Mr. Bernardo 1 BASIC ARDUINO WORKSHOP Course Goals Introduce Arduino Hardware and Understand Input Software and Output Create simple project 2 Arduino Open-source

More information

Arduino Programming and Interfacing

Arduino Programming and Interfacing Arduino Programming and Interfacing Stensat Group LLC, Copyright 2017 1 Robotic Arm Experimenters Kit 2 Legal Stuff Stensat Group LLC assumes no responsibility and/or liability for the use of the kit and

More information

More Arduino Programming

More Arduino Programming Introductory Medical Device Prototyping Arduino Part 2, http://saliterman.umn.edu/ Department of Biomedical Engineering, University of Minnesota More Arduino Programming Digital I/O (Read/Write) Analog

More information

IME-100 Interdisciplinary Design and Manufacturing

IME-100 Interdisciplinary Design and Manufacturing IME-100 Interdisciplinary Design and Manufacturing Introduction Arduino and Programming Topics: 1. Introduction to Microprocessors/Microcontrollers 2. Introduction to Arduino 3. Arduino Programming Basics

More information

Arduino Part 2. Introductory Medical Device Prototyping

Arduino Part 2. Introductory Medical Device Prototyping Introductory Medical Device Prototyping Arduino Part 2, http://saliterman.umn.edu/ Department of Biomedical Engineering, University of Minnesota More Arduino Programming Digital I/O (Read/Write) Analog

More information

Introduction To Arduino

Introduction To Arduino Introduction To Arduino What is Arduino? Hardware Boards / microcontrollers Shields Software Arduino IDE Simplified C Community Tutorials Forums Sample projects Arduino Uno Power: 5v (7-12v input) Digital

More information

Arduino Programming. Arduino UNO & Innoesys Educational Shield

Arduino Programming. Arduino UNO & Innoesys Educational Shield Arduino Programming Arduino UNO & Innoesys Educational Shield www.devobox.com Electronic Components & Prototyping Tools 79 Leandrou, 10443, Athens +30 210 51 55 513, info@devobox.com ARDUINO UNO... 3 INNOESYS

More information

Arduino Prof. Dr. Magdy M. Abdelhameed

Arduino Prof. Dr. Magdy M. Abdelhameed Course Code: MDP 454, Course Name:, Second Semester 2014 Arduino What is Arduino? Microcontroller Platform Okay but what s a Microcontroller? Tiny, self-contained computers in an IC Often contain peripherals

More information

Note. The above image and many others are courtesy of - this is a wonderful resource for designing circuits.

Note. The above image and many others are courtesy of   - this is a wonderful resource for designing circuits. Robotics and Electronics Unit 2. Arduino Objectives. Students will understand the basic characteristics of an Arduino Uno microcontroller. understand the basic structure of an Arduino program. know how

More information

Arduino Programming Part 4: Flow Control

Arduino Programming Part 4: Flow Control Arduino Programming Part 4: Flow Control EAS 199B, Winter 2010 Gerald Recktenwald Portland State University gerry@me.pdx.edu Goal Make choices based on conditions in the environment Logical expressions:

More information

Arduino Uno Microcontroller Overview

Arduino Uno Microcontroller Overview Innovation Fellows Program Arduino Uno Microcontroller Overview, http://saliterman.umn.edu/ Department of Biomedical Engineering, University of Minnesota Arduino Uno Power & Interface Reset Button USB

More information

This is the Arduino Uno: This is the Arduino motor shield: Digital pins (0-13) Ground Rail

This is the Arduino Uno: This is the Arduino motor shield: Digital pins (0-13) Ground Rail Reacting to Sensors In this tutorial we will be going over how to program the Arduino to react to sensors. By the end of this workshop you will have an understanding of how to use sensors with the Arduino

More information

Introduction to Programming. Writing an Arduino Program

Introduction to Programming. Writing an Arduino Program Introduction to Programming Writing an Arduino Program What is an Arduino? It s an open-source electronics prototyping platform. Say, what!? Let s Define It Word By Word Open-source: Resources that can

More information

University of Hull Department of Computer Science C4DI Interfacing with Arduinos

University of Hull Department of Computer Science C4DI Interfacing with Arduinos Introduction Welcome to our Arduino hardware sessions. University of Hull Department of Computer Science C4DI Interfacing with Arduinos Vsn. 1.0 Rob Miles 2014 Please follow the instructions carefully.

More information

Advanced Activities - Information and Ideas

Advanced Activities - Information and Ideas Advanced Activities - Information and Ideas Congratulations! You successfully created and controlled the robotic chameleon using the program developed for the chameleon project. Here you'll learn how you

More information

PDF of this portion of workshop notes:

PDF of this portion of workshop notes: PDF of this portion of workshop notes: http://goo.gl/jfpeym Teaching Engineering Design with Student-Owned Digital and Analog Lab Equipment John B. Schneider Washington State University June 15, 2015 Overview

More information

Prototyping & Engineering Electronics Kits Basic Kit Guide

Prototyping & Engineering Electronics Kits Basic Kit Guide Prototyping & Engineering Electronics Kits Basic Kit Guide odysseyboard.com Please refer to www.odysseyboard.com for a PDF updated version of this guide. Guide version 1.0, February, 2018. Copyright Odyssey

More information

keyestudio Keyestudio MEGA 2560 R3 Board

keyestudio Keyestudio MEGA 2560 R3 Board Keyestudio MEGA 2560 R3 Board Introduction: Keyestudio Mega 2560 R3 is a microcontroller board based on the ATMEGA2560-16AU, fully compatible with ARDUINO MEGA 2560 REV3. It has 54 digital input/output

More information

Smart Objects. SAPIENZA Università di Roma, M.Sc. in Product Design Fabio Patrizi

Smart Objects. SAPIENZA Università di Roma, M.Sc. in Product Design Fabio Patrizi Smart Objects SAPIENZA Università di Roma, M.Sc. in Product Design Fabio Patrizi 1 What is a Smart Object? Essentially, an object that: Senses Thinks Acts 2 Example 1 https://www.youtube.com/watch?v=6bncjd8eke0

More information

Lab-3: LCDs Serial Communication Analog Inputs Temperature Measurement System

Lab-3: LCDs Serial Communication Analog Inputs Temperature Measurement System Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-3: LCDs Serial Communication Analog Inputs Temperature Measurement System Ahmed Okasha okasha1st@gmail.com

More information

Specification. 1.Power Supply direct from Microcontroller Board. 2.The circuit can be used with Microcontroller Board such as Arduino UNO R3.

Specification. 1.Power Supply direct from Microcontroller Board. 2.The circuit can be used with Microcontroller Board such as Arduino UNO R3. Part Number : Product Name : FK-FA1410 12-LED AND 3-BOTTON SHIELD This is the experimental board for receiving and transmitting data from the port of microcontroller. The function of FK-FA1401 is fundamental

More information

Monitor your home remotely using the Arduino

Monitor your home remotely using the Arduino Monitor your home remotely using the Arduino WiFi Shield How to monitor some data in your home using precisely this Arduino WiFi shield. Along with the Arduino Uno board, the final system will form an

More information

TABLE OF CONTENTS INTRODUCTION LESSONS PROJECTS

TABLE OF CONTENTS INTRODUCTION LESSONS PROJECTS TABLE OF CONTENTS INTRODUCTION Introduction to Components - Maker UNO 5 - Maker UNO Board 6 - Setting Up - Download Arduino IDE 7 - Install Maker UNO Drivers - Install Maker UNO Board Package 3 LESSONS.

More information

To lead your students through this activity, you will need your computer, attached to a projector, for projecting your code for students to see.

To lead your students through this activity, you will need your computer, attached to a projector, for projecting your code for students to see. To lead your students through this activity, you will need your computer, attached to a projector, for projecting your code for students to see. STEP 1: PREPARE TO PROGRAM 1. Launch the IDE by clicking

More information

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018 StenBOT Robot Kit 1 Stensat Group LLC, Copyright 2018 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

Arduino Workshop. Overview. What is an Arduino? Why Arduino? Setting up your Arduino Environment. Get an Arduino based board and usb cable

Arduino Workshop. Overview. What is an Arduino? Why Arduino? Setting up your Arduino Environment. Get an Arduino based board and usb cable Arduino Workshop Overview Arduino, The open source Microcontroller for easy prototyping and development What is an Arduino? Arduino is a tool for making computers that can sense and control more of the

More information

FUNCTIONS For controlling the Arduino board and performing computations.

FUNCTIONS For controlling the Arduino board and performing computations. d i g i t a l R e a d ( ) [Digital I/O] Reads the value from a specified digital pin, either HIGH or LOW. digitalread(pin) pin: the number of the digital pin you want to read HIGH or LOW Sets pin 13 to

More information

Embedded Systems. Arduino. Labs. Labs 1/17/2019. CSE 362: Computer Design Lecture 2: Embedded Systems

Embedded Systems. Arduino. Labs. Labs 1/17/2019. CSE 362: Computer Design Lecture 2: Embedded Systems Embedded Systems CSE 362: Computer Design Lecture 2: Embedded Systems Cynthia Taylor University of Illinois, Chicago August 31, 2017 Microchips used in a non computer setting Inside some other device Frequently

More information

How to Use an Arduino

How to Use an Arduino How to Use an Arduino By Vivian Law Introduction The first microcontroller, TMS-1802-NC, was built in 1971 by Texas Instruments. It owed its existence to the innovation and versatility of silicon and the

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

USER MANUAL ARDUINO I/O EXPANSION SHIELD

USER MANUAL ARDUINO I/O EXPANSION SHIELD USER MANUAL ARDUINO I/O EXPANSION SHIELD Description: Sometimes Arduino Uno users run short of pins because there s a lot of projects that requires more than 20 signal pins. The only option they are left

More information

cs281: Introduction to Computer Systems Lab03 K-Map Simplification for an LED-based Circuit Decimal Input LED Result LED3 LED2 LED1 LED3 LED2 1, 2

cs281: Introduction to Computer Systems Lab03 K-Map Simplification for an LED-based Circuit Decimal Input LED Result LED3 LED2 LED1 LED3 LED2 1, 2 cs28: Introduction to Computer Systems Lab3 K-Map Simplification for an LED-based Circuit Overview In this lab, we will build a more complex combinational circuit than the mux or sum bit of a full adder

More information

Arduino Programming Part 3. EAS 199A Fall 2010

Arduino Programming Part 3. EAS 199A Fall 2010 Arduino Programming Part 3 EAS 199A Fall 2010 Overview Part I Circuits and code to control the speed of a small DC motor. Use potentiometer for dynamic user input. Use PWM output from Arduino to control

More information

Digital Pins and Constants

Digital Pins and Constants Lesson Lesson : Digital Pins and Constants Digital Pins and Constants The Big Idea: This lesson is the first step toward learning to connect the Arduino to its surrounding world. You will connect lights

More information

Button Input: On/off state change

Button Input: On/off state change Button Input: On/off state change Living with the Lab Gerald Recktenwald Portland State University gerry@pdx.edu User input features of the fan Potentiometer for speed control Continually variable input

More information

CTEC 1802 Embedded Programming Labs

CTEC 1802 Embedded Programming Labs CTEC 1802 Embedded Programming Labs This document is intended to get you started using the Arduino and our I/O board in the laboratory - and at home! Many of the lab sessions this year will involve 'embedded

More information

ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL

ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL ROBOTLINKING THE POWER SUPPLY LEARNING KIT TUTORIAL 1 Preface About RobotLinking RobotLinking is a technology company focused on 3D Printer, Raspberry Pi and Arduino open source community development.

More information

Lab 2 - Powering the Fubarino. Fubarino,, Intro to Serial, Functions and Variables

Lab 2 - Powering the Fubarino. Fubarino,, Intro to Serial, Functions and Variables Lab 2 - Powering the Fubarino Fubarino,, Intro to Serial, Functions and Variables Part 1 - Powering the Fubarino SD The Fubarino SD is a 56 pin device. Each pin on a chipkit device falls broadly into one

More information

Electronic Brick Starter Kit

Electronic Brick Starter Kit Electronic Brick Starter Kit Getting Started Guide v1.0 by Introduction Hello and thank you for purchasing the Electronic Brick Starter Pack from Little Bird Electronics. We hope that you will find learning

More information

EP486 Microcontroller Applications

EP486 Microcontroller Applications EP486 Microcontroller Applications Topic 6 Step & Servo Motors Joystick & Water Sensors Department of Engineering Physics University of Gaziantep Nov 2013 Sayfa 1 Step Motor http://en.wikipedia.org/wiki/stepper_motor

More information

ARDUINO UNO REV3 Code: A000066

ARDUINO UNO REV3 Code: A000066 ARDUINO UNO REV3 Code: A000066 The UNO is the best board to get started with electronics and coding. If this is your first experience tinkering with the platform, the UNO is the most robust board you can

More information

Arduino and Matlab for prototyping and manufacturing

Arduino and Matlab for prototyping and manufacturing Arduino and Matlab for prototyping and manufacturing Enrique Chacón Tanarro 11th - 15th December 2017 UBORA First Design School - Nairobi Enrique Chacón Tanarro e.chacon@upm.es Index 1. Arduino 2. Arduino

More information

Robotics and Electronics Unit 5

Robotics and Electronics Unit 5 Robotics and Electronics Unit 5 Objectives. Students will work with mechanical push buttons understand the shortcomings of the delay function and how to use the millis function. In this unit we will use

More information

TANGIBLE MEDIA & PHYSICAL COMPUTING INTRODUCTION TO ARDUINO

TANGIBLE MEDIA & PHYSICAL COMPUTING INTRODUCTION TO ARDUINO TANGIBLE MEDIA & PHYSICAL COMPUTING INTRODUCTION TO ARDUINO AGENDA ARDUINO HARDWARE THE IDE & SETUP BASIC PROGRAMMING CONCEPTS DEBUGGING & HELLO WORLD INPUTS AND OUTPUTS DEMOS ARDUINO HISTORY IN 2003 HERNANDO

More information

CARTOOINO Projects Book

CARTOOINO Projects Book 1 CARTOOINO Projects Book Acknowledgement Acknowledgement This Cartooino Projects Book is a cartoon based adaptation of the Arduino Projects Book. The Cartooino Project Book was developed by the GreenLab

More information

Schedule. Sanford Bernhardt, Sangster, Kumfer, Michalaka. 3:10-5:00 Workshop: Build a speedometer 5:15-7:30 Dinner and Symposium: Group 2

Schedule. Sanford Bernhardt, Sangster, Kumfer, Michalaka. 3:10-5:00 Workshop: Build a speedometer 5:15-7:30 Dinner and Symposium: Group 2 Schedule 8:00-11:00 Workshop: Arduino Fundamentals 11:00-12:00 Workshop: Build a follower robot 1:30-3:00 Symposium: Group 1 Sanford Bernhardt, Sangster, Kumfer, Michalaka 3:10-5:00 Workshop: Build a speedometer

More information

Digital Design through. Arduino

Digital Design through. Arduino Digital Design through 1 Arduino G V V Sharma Contents 1 Display Control through Hardware 2 1.1 Powering the Display.................................. 2 1.2 Controlling the Display.................................

More information

Blinking an LED 1 PARTS: Circuit 2 LED. Wire. 330Ω Resistor

Blinking an LED 1 PARTS: Circuit 2 LED. Wire. 330Ω Resistor Circuit PIN 3 RedBoard Blinking an LED LED (Light-Emitting Diode) Resistor (33 ohm) (Orange-Orange-Brown) LEDs (light-emitting diodes) are small, powerful lights that are used in many different applications.

More information

Update: Ver 1.3 Dec Arduino Learning Guide For Beginner Using. Created by Cytron Technologies Sdn Bhd - All Rights Reserved

Update: Ver 1.3 Dec Arduino Learning Guide For Beginner Using. Created by Cytron Technologies Sdn Bhd - All Rights Reserved Update: Ver 1.3 Dec 2018 Arduino Learning Guide For Beginner Using Created by Cytron Technologies Sdn Bhd - All Rights Reserved LESSON 0 SETTING UP HARDWARE & SOFTWARE Part 1: Put Up Label Stickers for

More information

Introduction to Arduino. Wilson Wingston Sharon

Introduction to Arduino. Wilson Wingston Sharon Introduction to Arduino Wilson Wingston Sharon cto@workshopindia.com Physical computing Developing solutions that implement a software to interact with elements in the physical universe. 1. Sensors convert

More information

Arduino Micro Breadboard Laboratory Interface Processor (Micro BLIP) User Manual

Arduino Micro Breadboard Laboratory Interface Processor (Micro BLIP) User Manual Arduino Micro Breadboard Laboratory Interface Processor (Micro BLIP) MicroBLIP circuit board v2.0 Operating System v2.0.0 1/22/2019 User Manual 2 1 Setup and Operation 1.1 Introduction For the past ten

More information

Microcontrollers and Interfacing week 8 exercises

Microcontrollers and Interfacing week 8 exercises 2 HARDWARE DEBOUNCING Microcontrollers and Interfacing week 8 exercises 1 More digital input When using a switch for digital input we always need a pull-up resistor. For convenience, the microcontroller

More information

Arduino Uno. Power & Interface. Arduino Part 1. Introductory Medical Device Prototyping. Digital I/O Pins. Reset Button. USB Interface.

Arduino Uno. Power & Interface. Arduino Part 1. Introductory Medical Device Prototyping. Digital I/O Pins. Reset Button. USB Interface. Introductory Medical Device Prototyping Arduino Part 1, http://saliterman.umn.edu/ Department of Biomedical Engineering, University of Minnesota Arduino Uno Power & Interface Reset Button USB Interface

More information

Experiment 4.A. Speed and Position Control. ECEN 2270 Electronics Design Laboratory 1

Experiment 4.A. Speed and Position Control. ECEN 2270 Electronics Design Laboratory 1 .A Speed and Position Control Electronics Design Laboratory 1 Procedures 4.A.0 4.A.1 4.A.2 4.A.3 4.A.4 Turn in your Pre-Lab before doing anything else Speed controller for second wheel Test Arduino Connect

More information

EK307 Lab: Microcontrollers

EK307 Lab: Microcontrollers EK307 Lab: Microcontrollers Laboratory Goal: Program a microcontroller to perform a variety of digital tasks. Learning Objectives: Learn how to program and use the Atmega 323 microcontroller Suggested

More information

Introduction to Arduino Diagrams & Code Brown County Library

Introduction to Arduino Diagrams & Code Brown County Library Introduction to Arduino Diagrams & Code Project 01: Blinking LED Components needed: Arduino Uno board LED Put long lead into pin 13 // Project 01: Blinking LED int LED = 13; // LED connected to digital

More information

MEDIS Module 2. Microcontroller based systems for controlling industrial processes. Chapter 4: Timer and interrupts. M. Seyfarth, Version 0.

MEDIS Module 2. Microcontroller based systems for controlling industrial processes. Chapter 4: Timer and interrupts. M. Seyfarth, Version 0. MEDIS Module 2 Microcontroller based systems for controlling industrial processes Chapter 4: Timer and interrupts M. Seyfarth, Version 0.1 Steuerungstechnik 1: Speicherprogrammierbare Steuerungstechnik

More information

Introduction to Arduino Diagrams & Code Brown County Library

Introduction to Arduino Diagrams & Code Brown County Library Introduction to Arduino Diagrams & Code Project 01: Blinking LED Components needed: Arduino Uno board LED Put long lead into pin 13 // Project 01: Blinking LED int LED = 13; // LED connected to digital

More information

General Syntax. Operators. Variables. Arithmetic. Comparison. Assignment. Boolean. Types. Syntax int i; float j = 1.35; int k = (int) j;

General Syntax. Operators. Variables. Arithmetic. Comparison. Assignment. Boolean. Types. Syntax int i; float j = 1.35; int k = (int) j; General Syntax Statements are the basic building block of any C program. They can assign a value to a variable, or make a comparison, or make a function call. They must be terminated by a semicolon. Every

More information

analogwrite(); The analogwrite function writes an analog value (PWM wave) to a PWM-enabled pin.

analogwrite(); The analogwrite function writes an analog value (PWM wave) to a PWM-enabled pin. analogwrite(); The analogwrite function writes an analog value (PWM wave) to a PWM-enabled pin. Syntax analogwrite(pin, value); For example: analogwrite(2, 255); or analogwrite(13, 0); Note: Capitalization

More information

Physical Computing Self-Quiz

Physical Computing Self-Quiz Physical Computing Self-Quiz The following are questions you should be able to answer without reference to outside material by the middle of the semester in Introduction to Physical Computing. Try to answer

More information

Arduino Course. Technology Will Save Us - Tim Brooke 10th August Friday, 9 August 13

Arduino Course. Technology Will Save Us - Tim Brooke 10th August Friday, 9 August 13 Arduino Course Technology Will Save Us - Tim Brooke 10th August 2013 Arduino Projects http://www.instructables.com/id/20-unbelievable-arduino-projects/ Blink /* Blink Turns on an LED on for one second,

More information

Controlling a fischertechnik Conveyor Belt with Arduino board

Controlling a fischertechnik Conveyor Belt with Arduino board EXPERIMENT TITLE: Controlling a fischertechnik Conveyor Belt with Arduino board PRODUCTS USED: CHALLENGE: AUTHOR: CREDITS: Interface and control a conveyor belt model (24 Volts, fischertechnik) with an

More information

Sten-SLATE ESP Kit. Description and Programming

Sten-SLATE ESP Kit. Description and Programming Sten-SLATE ESP Kit Description and Programming Stensat Group LLC, Copyright 2016 Overview In this section, you will be introduced to the processor board electronics and the arduino software. At the end

More information

3. The circuit is composed of 1 set of Relay circuit.

3. The circuit is composed of 1 set of Relay circuit. Part Number : Product Name : FK-FA1420 ONE CHANNEL 12V RELAY MODULE This is the experimental module for a relay controller as the fundamental controlling programming. It is adaptable or is able to upgrade

More information

FIRE SENSOR ROBOT USING ATMEGA8L

FIRE SENSOR ROBOT USING ATMEGA8L PROJECT REPORT MICROCONTROLLER AND APPLICATIONS ECE 304 FIRE SENSOR ROBOT USING ATMEGA8L BY AKSHAY PATHAK (11BEC1104) SUBMITTED TO: PROF. VENKAT SUBRAMANIAN PRAKHAR SINGH (11BEC1108) PIYUSH BLAGGAN (11BEC1053)

More information

Programming. The Programmable Box! with. Programming made fun Ages 10+ V1.0 Copyright 2014, 2015 Your Inner Geek, LLC

Programming. The Programmable Box! with. Programming made fun Ages 10+ V1.0 Copyright 2014, 2015 Your Inner Geek, LLC C Programming with The Programmable Box! Programming made fun Ages 10+ 1 Copyright 2014, 2015 by Your Inner Geek, LLC. All rights reserved. Except as permitted under the United States Copyright Act of

More information

Grove - Thumb Joystick

Grove - Thumb Joystick Grove - Thumb Joystick Release date: 9/20/2015 Version: 1.0 Wiki: http://www.seeedstudio.com/wiki/grove_-_thumb_joystick Bazaar: http://www.seeedstudio.com/depot/grove-thumb-joystick-p-935.html 1 Document

More information

WALT: definition and decomposition of complex problems in terms of functional and non-functional requirements

WALT: definition and decomposition of complex problems in terms of functional and non-functional requirements Item 5: It's Totally Random Monday, 5 October 08 :5 PM IT'S TOTALLY RANDOM EXPLORE WALT: definition and decomposition of complex problems in terms of functional and non-functional requirements WILF - Defined

More information

Designed & Developed By: Ms. Jasleen Kaur, PhD Scholar, CSE. Computer Science & Engineering Department

Designed & Developed By: Ms. Jasleen Kaur, PhD Scholar, CSE. Computer Science & Engineering Department Design & Development of IOT application using Intel based Galileo Gen2 board A Practical Approach (Experimental Manual For B.Tech & M.Tech Students) For SoC and Embedded systems in association with Intel

More information

Programming. The Programmable Box! with. Programming made fun Ages 10+ V1.0 Copyright 2014, 2015 Your Inner Geek, LLC

Programming. The Programmable Box! with. Programming made fun Ages 10+ V1.0 Copyright 2014, 2015 Your Inner Geek, LLC C Programming with The Programmable Box! Programming made fun Ages 10+ 1 Copyright 2014, 2015 by Your Inner Geek, LLC. All rights reserved. Except as permitted under the United States Copyright Act of

More information

GOOD MORNING SUNSHINE

GOOD MORNING SUNSHINE Item 11: Good Morning Sunshine Monday, 15 October 2018 12:30 PM GOOD MORNING SUNSHINE EXPLORE WALT: definition and decomposition of complex problems in terms of functional and non-functional requirements

More information

Lab 2.2 Ohm s Law and Introduction to Arduinos

Lab 2.2 Ohm s Law and Introduction to Arduinos Lab 2.2 Ohm s Law and Introduction to Arduinos Objectives: Get experience using an Arduino Learn to use a multimeter to measure Potential units of volts (V) Current units of amps (A) Resistance units of

More information

Arduino: Piezo Diagrams & Code Brown County Library. Projects 01 & 02: Scale and Playing a Tune Components needed: Arduino Uno board piezo

Arduino: Piezo Diagrams & Code Brown County Library. Projects 01 & 02: Scale and Playing a Tune Components needed: Arduino Uno board piezo Arduino: Piezo Diagrams & Code Projects 01 & 02: Scale and Playing a Tune Components needed: Arduino Uno board piezo /* Piezo 01 : Play a scale Code adapted from Adafruit Arduino Lesson 10 (learn.adafruit.com/adafruit-arduino-lesson-

More information

Introduction to Microcontrollers Using Arduino. PhilRobotics

Introduction to Microcontrollers Using Arduino. PhilRobotics Introduction to Microcontrollers Using Arduino PhilRobotics Objectives Know what is a microcontroller Learn the capabilities of a microcontroller Understand how microcontroller execute instructions Objectives

More information

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD). ARDUINO UNO REV3 SMD Code: A000073 The board everybody gets started with, based on the ATmega328 (SMD). The Arduino Uno SMD R3 is a microcontroller board based on the ATmega328. It has 14 digital input/output

More information

Touch Board User Guide. Introduction

Touch Board User Guide. Introduction Touch Board User Guide Introduction The Crazy Circuits Touch Board is a fun way to create interactive projects. The Touch Board has 11 built in Touch Points for use with projects and also features built

More information

Arduino For Amateur Radio

Arduino For Amateur Radio Arduino For Amateur Radio Introduction to Arduino Micro controller vs. a PI Arduino Models, Books and Add-Ons Amateur Radio Applications Arduino Uno/Pro Micro Introduction to Arduino Programming More on

More information

ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives:

ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives: ECGR 4101/5101, Fall 2016: Lab 1 First Embedded Systems Project Learning Objectives: This lab will introduce basic embedded systems programming concepts by familiarizing the user with an embedded programming

More information

3.The circuit board is composed of 4 sets which are 16x2 LCD Shield, 3 pieces of Switch, 2

3.The circuit board is composed of 4 sets which are 16x2 LCD Shield, 3 pieces of Switch, 2 Part Number : Product Name : FK-FA1416 MULTI-FUNCTION 16x2 LCD SHIELD This is the experimental board of Multi-Function 16x2 LCD Shield as the fundamental programming about the digits, alphabets and symbols.

More information

Update: Ver 1.3 Dec Arduino Learning Guide For Beginner Using. Created by Cytron Technologies Sdn Bhd - All Rights Reserved

Update: Ver 1.3 Dec Arduino Learning Guide For Beginner Using. Created by Cytron Technologies Sdn Bhd - All Rights Reserved Update: Ver 1.3 Dec 2018 Arduino Learning Guide For Beginner Using Created by Cytron Technologies Sdn Bhd - All Rights Reserved LESSON 0 SETTING UP HARDWARE & SOFTWARE Part 1: Put Up Label Stickers for

More information

SPDM Level 2 Smart Electronics Unit, Level 2

SPDM Level 2 Smart Electronics Unit, Level 2 SPDM Level 2 Smart Electronics Unit, Level 2 Evidence Folder John Johns Form 3b RSA Tipton 1.1 describe the purpose of circuit components and symbols. The candidate can describe the purpose of a range

More information

Lab 2 - Powering the Fubarino, Intro to Serial, Functions and Variables

Lab 2 - Powering the Fubarino, Intro to Serial, Functions and Variables Lab 2 - Powering the Fubarino, Intro to Serial, Functions and Variables Part 1 - Powering the Fubarino SD The Fubarino SD is a 56 pin device. Each pin on a chipkit device falls broadly into one of 9 categories:

More information

Thursday, September 15, electronic components

Thursday, September 15, electronic components electronic components a desktop computer relatively complex inside: screen (CRT) disk drive backup battery power supply connectors for: keyboard printer n more! Thursday, September 15, 2011 integrated

More information

Laboratory 1 Introduction to the Arduino boards

Laboratory 1 Introduction to the Arduino boards Laboratory 1 Introduction to the Arduino boards The set of Arduino development tools include µc (microcontroller) boards, accessories (peripheral modules, components etc.) and open source software tools

More information

Grove - Thumb Joystick

Grove - Thumb Joystick Grove - Thumb Joystick Introduction 3.3V 5.0V Analog Grove - Thumb Joystick is a Grove compatible module which is very similar to the analog joystick on PS2 (PlayStation 2) controllers. The X and Y axes

More information

SPLDuino Programming Guide

SPLDuino Programming Guide SPLDuino Programming Guide V01 http://www.helloapps.com http://helloapps.azurewebsites.net Mail: splduino@gmail.com HelloApps Co., Ltd. 1. Programming with SPLDuino 1.1 Programming with Arduino Sketch

More information

SECOND EDITION. Arduino Cookbook. Michael Margolis O'REILLY- Tokyo. Farnham Koln Sebastopol. Cambridge. Beijing

SECOND EDITION. Arduino Cookbook. Michael Margolis O'REILLY- Tokyo. Farnham Koln Sebastopol. Cambridge. Beijing SECOND EDITION Arduino Cookbook Michael Margolis Beijing Cambridge Farnham Koln Sebastopol O'REILLY- Tokyo Table of Contents Preface xi 1. Getting Started 1 1.1 Installing the Integrated Development Environment

More information