// The REAL DEAL - Running Code. int led22 = 22; int led23 = 23; int led24 = 24; int led25 = 25; int led27 = 27; int led29 = 29; int led31 = 31;

Size: px
Start display at page:

Download "// The REAL DEAL - Running Code. int led22 = 22; int led23 = 23; int led24 = 24; int led25 = 25; int led27 = 27; int led29 = 29; int led31 = 31;"

Transcription

1 /* // The REAL DEAL - Running Code */ int led22 = 22; int led23 = 23; int led24 = 24; int led25 = 25; int led27 = 27; int led29 = 29; int led31 = 31; int led33 = 33; int led35 = 35; int led36 = 36; int led37 = 37; int led38 = 38; //int led40 = 40; // output 40 not working int led42 = 42; int led44 = 44; int led46 = 46; int led48 = 48; int ramp = A0; int wye = A1; int eevjct = A2; int mc = A3; int bwf = A4;

2 int ews = A8; //East Wye Swtich status int wws = A9; // West Wye Switch status int eevs = A10; //East El Vado Jct Switch status int rest = A11; // Show restricting input //int A12 - Dead input int perm = A13; // Permit to enter input boolean permlatch = false; int timer2 = 500; int timer; long currentmillis = 0; long previousmillis = 0; long currentmillis2 = 0; long previousmillis2 = 0; long interval = 900; long interval2 = 300; int ledstate = LOW; void setup() pinmode(a0, INPUT); pinmode(a1, INPUT); pinmode(a2, INPUT); pinmode(a3, INPUT); pinmode(a4, INPUT); pinmode(a8, INPUT); pinmode(a9, INPUT); pinmode(a10, INPUT); pinmode(a11, INPUT);

3 pinmode(a12, INPUT); pinmode(a13, INPUT); pinmode(a14, INPUT); pinmode(a15, INPUT); pinmode(led22, OUTPUT); pinmode(led23, OUTPUT); pinmode(led24, OUTPUT); pinmode(led25, OUTPUT); pinmode(led27, OUTPUT); pinmode(led29, OUTPUT); pinmode(led31, OUTPUT); pinmode(led33, OUTPUT); pinmode(led35, OUTPUT); pinmode(led37, OUTPUT); pinmode(led36, OUTPUT); pinmode(led38, OUTPUT); // pinmode(led40, OUTPUT); pinmode(led42, OUTPUT); pinmode(led44, OUTPUT); pinmode(led46, OUTPUT); pinmode(led48, OUTPUT); digitalwrite(led31,high); //S2- RD digitalwrite(led37,high); // S3- RD void loop() int led22 = 22;

4 int led23 = 23; int led24 = 24; int led25 = 25; int led27 = 27; int led29 = 29; int led31 = 31; //S2 Red int led33 = 33; //S2 White int led35 = 35; //S3 White int led36 = 36; int led37 = 37; //S3 Red int led38 = 38; //int led40 = 40; // output 40 not working int led42 = 42; int led44 = 44; int led46 = 46; int led48 = 48; int ramp = A0; int wye = A1; int eevjct = A2; int mc = A3; int bwf = A4; int ews = A8; //East Wye Swtich status, high is diverging int wws = A9; // West Wye Switch status, high is diverging int eevs = A10; //East El Vado Jct Switch status int rest = A11; // Show restricting input int perm = A13; // Permit to enter input boolean permlatch;

5 if (digitalread(perm) == HIGH) delay(100); // delay to debounce switch permlatch =!permlatch; // toggle running variable digitalwrite(led22,high); //EEV Jct Panel Indication if (digitalread(a10) == LOW) //EEV Jct Switch Normal = LOW digitalwrite(led31,!permlatch); //S2- RD digitalwrite(led33,permlatch); //S2- WT else digitalwrite(led37,!permlatch); // S3- RD digitalwrite(led35,permlatch); // S3- WT if (digitalread(eevjct) == LOW digitalread(wws) == HIGH) digitalwrite(led27,low); // S4- YL digitalwrite(led29,high); //S4- RD else

6 digitalwrite(led29,low); //S4- RD digitalwrite(led27,high); //S4- YL if (digitalread(a11) == LOW) if (digitalread(a10) == LOW) //EEV Jct Switch Normal = LOW if (digitalread(wws) == HIGH && digitalread(eevjct) == HIGH && digitalread(mc) == HIGH) //East Wye Switch: High = Normal, West Wye Switch: LOW = Normal digitalwrite(led46,low); // UPPER RED digitalwrite(led44,high); // UPPER YELLOW if (digitalread (ews) == LOW && digitalread(eevjct) == HIGH && digitalread(mc) == HIGH) //East Wye Switch: High = Normal, West Wye Switch: LOW = Normal digitalwrite(led46,low); // UPPER RED digitalwrite(led44,high); // UPPER YELLOW

7 if (digitalread(eevjct) == HIGH && digitalread(mc) == HIGH && digitalread(ramp) == HIGH && digitalread(wws) == LOW && digitalread (ews) == HIGH) // Note: LOW = Occupied digitalwrite(led46,low); // UPPER RED digitalwrite(led44,low); // UPPER YELLOW digitalwrite(led38,high); // UPPER GREEN if (digitalread(eevjct) == HIGH && digitalread(mc) == HIGH && digitalread(ramp) == LOW) // Note: LOW = Occupied digitalwrite(led46,low); // UPPER RED digitalwrite(led44,high); // UPPER YELLOW if (digitalread(eevjct) == LOW digitalread(mc) == LOW) // Note: LOW = Occupied

8 digitalwrite(led44,low); // UPPER YELLOW digitalwrite(led46,high); // UPPER RED if (digitalread(a10) == HIGH) //EEV Jct Switch Normal = LOW if (digitalread(eevjct) == HIGH && digitalread(bwf) == HIGH) // Note: LOW = Occupied digitalwrite(led48,low); // LOWER RED digitalwrite(led44,low); // UPPER YELLOW digitalwrite(led46,high); // UPPER RED digitalwrite(led42,high); // LOWER YELLOW if (digitalread(eevjct) == LOW digitalread(bwf) == LOW) // Note: LOW = Occupied digitalwrite(led44,low); // UPPER YELLOW digitalwrite(led46,high); // UPPER RED

9 if (digitalread(ramp) == HIGH && digitalread(ews) == HIGH) digitalwrite(led25,low); // S6- RD digitalwrite(led23,high); // S6- GN else digitalwrite(led23,low); // S6- GN digitalwrite(led25,high); // S6- RD if(digitalread(eevjct) == LOW) permlatch = false; digitalwrite(led22,permlatch); //EEV Jct Panel Indication digitalwrite(led33,permlatch); //S2- WT digitalwrite(led31,!permlatch); //S2- RD digitalwrite(led35,permlatch); // S3- WT digitalwrite(led37,!permlatch); // S3- RD

10 // Loop for blink logic: unsigned long currentmillis = millis(); if(currentmillis - previousmillis > interval) // save the last time you blinked the LED previousmillis = currentmillis; // if the LED is off turn it on and vice- versa: if (ledstate == LOW) ledstate = HIGH; else ledstate = LOW; // set the LED with the ledstate of the variable: //EEV Jct Switch Normal = LOW if(digitalread(a11) == HIGH && digitalread(a10) == LOW &&!permlatch == true) digitalwrite(led22,ledstate); //EEV Jct Panel Indication if(digitalread(a11) == HIGH && digitalread(a10) == LOW &&!permlatch == true) digitalwrite(led31, ledstate); if(digitalread(a11) == HIGH && digitalread(a10) == HIGH &&!permlatch == true) digitalwrite(led37, ledstate); if(digitalread(a11) == HIGH &&!permlatch == true) digitalwrite(led44,low); // UPPER YELLOW digitalwrite(led46,high); // UPPER RED digitalwrite(led48,ledstate); // LOWER RED

11

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

Lab 02 Arduino 數位感測訊號處理, SPI I2C 介面實驗. More Arduino Digital Signal Process

Lab 02 Arduino 數位感測訊號處理, SPI I2C 介面實驗. More Arduino Digital Signal Process Lab 02 Arduino 數位感測訊號處理, SPI I2C 介面實驗 More Arduino Digital Signal Process Blink Without Delay Sometimes you need to do two things at once. For example you might want to blink an LED (or some other timesensitive

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

I2C/TWI LCD1602 Module (Gadgeteer Compatible) (SKU: DFR0063)

I2C/TWI LCD1602 Module (Gadgeteer Compatible) (SKU: DFR0063) I2C/TWI LCD1602 Module (Gadgeteer Compatible) (SKU: DFR0063) Introduction This is another great I2C 16x2 LCD display compatible with Gadgeteer modules from DFRobot. With limited pin resources, your project

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

Arduino notes IDE. Serial commands. Arduino C language. Program structure. Arduino web site:

Arduino notes IDE. Serial commands. Arduino C language. Program structure. Arduino web site: 1 Arduino notes This is not a tutorial, but a collection of personal notes to remember the essentials of Arduino programming. The program fragments are snippets that represent the essential pieces of code,

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

Arduino notes 3: Digital input via buttons

Arduino notes 3: Digital input via buttons 1 Arduino notes 3: Digital input via buttons This is not a tutorial, but a collection of personal notes to remember the essentials of Arduino programming. The program fragments are snippets that represent

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

Juniper: A Functional Reactive Programming Language for the Arduino

Juniper: A Functional Reactive Programming Language for the Arduino Juniper: A Functional Reactive Programming Language for the Arduino Caleb Helbling Tufts University Samuel Z. Guyer Tufts University Workshop on Functional Art, Music, Modelling and Design (FARM) September

More information

Goal: Understand how to write programs for the Mudduino

Goal: Understand how to write programs for the Mudduino Goal: Understand how to write programs for the Mudduino #include int main(void) int i = 0; i = i + 25; while(1) return 0; printf("%d\n, i); i++; // This is template behind Arduino sketches int

More information

Goal: Strengthen our understanding of C and program our Mudduino boards

Goal: Strengthen our understanding of C and program our Mudduino boards Goal: Strengthen our understanding of C and program our Mudduino boards #include #define myarraysize 10 int myarray[myarraysize] = 34, 18, -12, 7, 5; int i; printf("values are: ["); for(i=0;

More information

/*f1q_timer_v Gábor Kertész */

/*f1q_timer_v Gábor Kertész */ /*f1q_timer_v19.2 2018.07.16. Gábor Kertész */ //---------------------------------------------Lybraries------------------------------------------------------------ #include // For servo and ESC

More information

Lesson 6 Programming Arduino Example 9.7. Chapter-9 L06: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Lesson 6 Programming Arduino Example 9.7. Chapter-9 L06: Internet of Things , Raj Kamal, Publs.: McGraw-Hill Education Lesson 6 Programming Arduino Example 9.7 1 Multitasking Environment A multitasking environment consists of multiple processes, tasks or threads. Consider Example 9.1. A set of Functions void north_south_green

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

Grove - Magnetic Switch

Grove - Magnetic Switch Grove - Magnetic Switch This is a Grove interface compatible Magnetic switch module. It is based on encapsulated dry reed switch CT10. CT10 is single-pole, single throw (SPST) type, having normally open

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

Arrays and Loops. Programming for Engineers Winter Andreas Zeller, Saarland University

Arrays and Loops. Programming for Engineers Winter Andreas Zeller, Saarland University Arrays and Loops Programming for Engineers Winter 2015 Andreas Zeller, Saarland University Datatypes millis() has the type unsigned long integer values in [0 2 32 1] Usual integer numbers ( int ) are

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

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

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

Interrupts Arduino, AVR, and deep dark programming secrets. What is an Interrupt?

Interrupts Arduino, AVR, and deep dark programming secrets. What is an Interrupt? Interrupts Arduino, AVR, and deep dark programming secrets What is an Interrupt? A transfer of program control that is not directed by the programmer Like a phone call in the middle of a conversation Stop

More information

Imperativ Programming. morning (again) Jens Dalsgaard Nielsen Aalborg University (1/24)

Imperativ Programming. morning (again) Jens Dalsgaard Nielsen Aalborg University (1/24) Imperativ Programming morning (again) Jens Dalsgaard Nielsen (jdn@es.aau.dk) Aalborg University (1/24) message Changed timing today Jens Dalsgaard Nielsen (jdn@es.aau.dk) Aalborg University (2/24) Jens

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

Example: short timearray[] = {500, 400, 500, 400, 100, 200, 100, 200, -1};

Example: short timearray[] = {500, 400, 500, 400, 100, 200, 100, 200, -1}; Write a sketch that once you enter g for go it turns the LED on and off for the amount of time in an array. Have the program terminate when it reaches a negative value (as time is always positive). Example:

More information

Digital I/O Operations

Digital I/O Operations Digital I/O Operations CSE0420 Embedded Systems By Z. Cihan TAYŞİ Outline Digital I/O Ports, Pins Direction Pull-up & pull-down Arduino programming Digital I/O examples on Arduino 1 Digital I/O Unlike

More information

WEEK PRactice. Turning on LED with a Switch. Learning Objective. Materials to Prepare. Summary of Class. Project Goal. Hardware Expression

WEEK PRactice. Turning on LED with a Switch. Learning Objective. Materials to Prepare. Summary of Class. Project Goal. Hardware Expression WEEK 04 Have LED My Way PRactice Turning on LED with a Switch Do you remember the project we worked on in week 3? It was a program that had making board s LED blink every second through a simple program.

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

MICROPROCESSORS A (17.383) Fall Lecture Outline

MICROPROCESSORS A (17.383) Fall Lecture Outline MICROPROCESSORS A (17.383) Fall 2010 Lecture Outline Class # 03 September 21, 2010 Dohn Bowden 1 Today s Lecture Syllabus review Microcontroller Hardware and/or Interface Programming/Software Lab Homework

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

Smart Garment Design

Smart Garment Design Smart Garment Design 8. Practical Examples Sungmin Kim SEOUL NATIONAL UNIVERSITY Term Project Smart Garment Design Design Own Smart Garment Function definition Circuit design Fabrication Programming Presentation

More information

المعروضة ضمن الفديو. Serial.print("Current humidity = "); Serial.print(DHT.humidity ;) Serial.print("temperature = "); Serial.print(DHT.

المعروضة ضمن الفديو. Serial.print(Current humidity = ); Serial.print(DHT.humidity ;) Serial.print(temperature = ); Serial.print(DHT. االكواد جميع البرمجية لجميع المتحسسات المعروضة ضمن الفديو الدرس 1 #define dht_apin A0 // Analog Pin sensor is connected to dht DHT; void setup)( Serial.begin(9600 ;) delay(500);//delay to let system boot

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

Connecting Arduino to Processing

Connecting Arduino to Processing Connecting Arduino to Processing Introduction to Processing So, you ve blinked some LEDs with Arduino, and maybe you ve even drawn some pretty pictures with Processing - what s next? At this point you

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

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

#include "pitches.h" #include <Wire.h> #include <avr/pgmspace.h> #include "Adafruit_Trellis.h"

#include pitches.h #include <Wire.h> #include <avr/pgmspace.h> #include Adafruit_Trellis.h #include "pitches.h" #include #include #include "Adafruit_Trellis.h" Adafruit_Trellis matrix0 = Adafruit_Trellis(); Adafruit_TrellisSet trellis = Adafruit_TrellisSet(&matrix0);

More information

Chapter 2 The Basic Functions

Chapter 2 The Basic Functions Chapter 2 The Basic Functions 2.1 Overview The code you learn to write for your Arduino is very similar to the code you write in any other computer language. This implies that all the basic concepts remain

More information

PROGRAMMING ARDUINO COURSE ON ADVANCED INTERACTION TECHNIQUES. Luís Carriço FCUL 2012/13

PROGRAMMING ARDUINO COURSE ON ADVANCED INTERACTION TECHNIQUES. Luís Carriço FCUL 2012/13 Sources: Arduino Hands-on Workshop, SITI, Universidad Lusófona Arduino Spooky projects Basic electronics, University Pennsylvania Beginning Arduino Programming Getting Started With Arduino COURSE ON ADVANCED

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

Grove - Ear-clip Heart Rate Sensor

Grove - Ear-clip Heart Rate Sensor Grove - Ear-clip Heart Rate Sensor Release date: 9/20/2015 Version: 1.0 Wiki: http://www.seeedstudio.com/wiki/grove_-_heart_rate_ear_clip_kit Bazaar: http://www.seeedstudio.com/depot/grove-earclip-heart-rate-sensor-p-1116.html

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

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

DFRduino Beginner Kit For Arduino V3 SKU:DFR0100

DFRduino Beginner Kit For Arduino V3 SKU:DFR0100 DFRduino Beginner Kit For Arduino V3 SKU:DFR0100 Contents 1 Introduction 2 Getting Started with Arduino 3 Tutorial 3.1 Blinking a LED 3.2 SOS Beacon 3.3 Traffic Light 3.4 Fading Light 3.5 RGB LED 3.6 Alarm

More information

Grove - I2C FM Receiver

Grove - I2C FM Receiver Grove - I2C FM Receiver Grove - I2C FM Receiver is a wideband FM receiver module, this module is based on RDA5807M. The RDA5807M series are the latest generation single-chip broadcast FM stereo radio tuner

More information

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates. Invitation to Computer Science, C++ Version, Third Edition

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates. Invitation to Computer Science, C++ Version, Third Edition Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition Objectives In this chapter, you will learn about: The binary numbering

More information

Curiosity Killed the Cat?

Curiosity Killed the Cat? Curiosity Killed the Cat? Curiosity Killed the Cat? is based loosely on the thought experiment devised by Erwin Schrödinger in 1935. Schrödinger s cat explores the idea of applying the quantum idea of

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

White-Box Testing Techniques

White-Box Testing Techniques T-76.5613 Software Testing and Quality Assurance Lecture 3, 18.9.2006 White-Box Testing Techniques SoberIT Content What are white-box testing techniques Control flow testing Statement coverage Branch coverage

More information

AP COMPUTER SCIENCE A 2006 SCORING GUIDELINES

AP COMPUTER SCIENCE A 2006 SCORING GUIDELINES AP COMPUTER SCIENCE A 2006 SCORING GUIDELINES Question 4: Drop Game (MBS) Part A: droplocationforcolumn 3 1/2 points +1 1/2 loop over Locations in column +1/2 correct loop (traverse entire column or until

More information

Matrix Clock V0.1 Firmware Descriptor

Matrix Clock V0.1 Firmware Descriptor Matrix Clock V0.1 Firmware Descriptor Matrix Clock V0.1 Firmware Descriptor by Dan Hamer is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. www.carbonfrog.com Page 1

More information

boolean running = false; // false off, true on boolean gezielt = false; // Water turned on on purpose, true=on, false=off

boolean running = false; // false off, true on boolean gezielt = false; // Water turned on on purpose, true=on, false=off // wetcat.ino // program to steer garden watering system #include #include // LED unsigned int LED_PIN_13 = 13; // IR receiver unsigned int RECV_PIN = 11; // IR codes remotes

More information

Lab 1: Arduino Basics. Rodrigo Carbajales and Marco Zennaro ICTP Trieste-Italy

Lab 1: Arduino Basics. Rodrigo Carbajales and Marco Zennaro ICTP Trieste-Italy Lab 1: Arduino Basics Rodrigo Carbajales and Marco Zennaro ICTP Trieste-Italy Step Zero Clean up your desks! :) Goals of this Lab Learn how the programming takes place Excercises about: installing the

More information

Random Spooky LED Eyes

Random Spooky LED Eyes Random Spooky LED Eyes Created by Bill Earl Last updated on 2016-08-27 12:48:22 PM UTC Guide Contents Guide Contents Overview and Materials Overview: Materials: Assembly Connect the Pixels: Load and Test:

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

CS12020 for CGVG. Practical 2. Jim Finnis

CS12020 for CGVG. Practical 2. Jim Finnis CS12020 for CGVG Practical 2 Jim Finnis (jcf1@aber.ac.uk) This week Solution to last week and discussion Global variables and the model The Main Loop pattern States and the State Machine pattern Random

More information

Logical operators 20/09/2018. The unit pulse. Background

Logical operators 20/09/2018. The unit pulse. Background ECE 150 Fundamentals of Programming Outline In this lesson, we will: See the need for asking if more than one condition is satisfied The unit pulse function Describe the binary logical AND and OR operators

More information

Coding : programming microcontrollers

Coding : programming microcontrollers Coding : programming microcontrollers Brian M. Andrus Extension Program Coordinator 21st CCLC Pathways & TRIO UBMS Center for College Access and Success Northeastern Illinois University Aaron Cortes Director

More information

#include "DHT.h" DHT dht(dhtpin, DHTTYPE); // Date and time functions using a DS1307 RTC connected via I2C and Wire lib

#include DHT.h DHT dht(dhtpin, DHTTYPE); // Date and time functions using a DS1307 RTC connected via I2C and Wire lib #include "DHT.h" #define DHTPIN 2 // what pin we're connected to // Uncomment whatever type you're using! #define DHTTYPE DHT11 // DHT 11 //#define DHTTYPE DHT22 // DHT 22 (AM2302) //#define DHTTYPE DHT21

More information

Variables. Data Types.

Variables. Data Types. Variables. Data Types. The usefulness of the "Hello World" programs shown in the previous section is quite questionable. We had to write several lines of code, compile them, and then execute the resulting

More information

Simulation for NX Safety Quick Start Guide

Simulation for NX Safety Quick Start Guide Simulation for NX Safety Quick Start Guide This guide describes how to program and run a simulation for an NX safety program. Overview Items needed: Sysmac Studios, version 1.08 or higher. Description

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

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

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

C-Programming. CSC209: Software Tools and Systems Programming. Paul Vrbik. University of Toronto Mississauga

C-Programming. CSC209: Software Tools and Systems Programming. Paul Vrbik. University of Toronto Mississauga C-Programming CSC209: Software Tools and Systems Programming Paul Vrbik University of Toronto Mississauga https://mcs.utm.utoronto.ca/~209/ Adapted from Dan Zingaro s 2015 slides. Week 2.0 1 / 19 What

More information

Microcontroller & Interfacing

Microcontroller & Interfacing Course Title Course Code Microcontroller & Interfacing EC406 Lecture : 3 Course Credit Practical : 1 Tutorial : 0 Total : 4 Course Objective At the end of the course the students will be able to Understand

More information

Exercise NMCGJ: Animated Graphics

Exercise NMCGJ: Animated Graphics Exercise NMCGJ: Animated Graphics Animation is a rapid display of a sequence of graphics or images which creates an illusion of movement. Animation is an important feature in game programming. In this

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

The short program to blink the red LED used the delay() function. This is very handy function for introducing a short time delays into programs.

The short program to blink the red LED used the delay() function. This is very handy function for introducing a short time delays into programs. Timing The short program to blink the red LED used the delay() function. This is very handy function for introducing a short time delays into programs. It helps buffer the differing time scales of humans

More information

Introduction to Computer Science Unit 2. Exercises

Introduction to Computer Science Unit 2. Exercises Introduction to Computer Science Unit 2. Exercises Note: Curly brackets { are optional if there is only one statement associated with the if (or ) statement. 1. If the user enters 82, what is 2. If the

More information

Home Automation With Arduino

Home Automation With Arduino Home Automation With Arduino Automate Your Home Using Open-Source Hardware Marco Schwartz, PhD Contents Legal Acknowledgments About the author About the companion website Preface to the First Edition Preface

More information

Program Modeling Concepts:

Program Modeling Concepts: Program Modeling Concepts: Lesson-6: FSM STATE TABLE AND ITS APPLICATIONS 1 FSM State Table A state table can then be designed for representation of every state in its rows. The following six columns are

More information

COMSC-051 Java Programming Part 1. Part-Time Instructor: Joenil Mistal

COMSC-051 Java Programming Part 1. Part-Time Instructor: Joenil Mistal COMSC-051 Java Programming Part 1 Part-Time Instructor: Joenil Mistal Chapter 5 5 Controlling the Flow of Your Program Control structures allow a programmer to define how and when certain statements will

More information

Conditions, logical expressions, and selection. Introduction to control structures

Conditions, logical expressions, and selection. Introduction to control structures Conditions, logical expressions, and selection Introduction to control structures Flow of control In a program, statements execute in a particular order By default, statements are executed sequentially:

More information

Boolean Expressions (Conditions)

Boolean Expressions (Conditions) Boolean Expressions (Conditions) Boolean Expressions: Boolean expressions evaluate to either True or False. Boolean expressions are constructed using relational operators, which allow for comparison between

More information

CS111: PROGRAMMING LANGUAGE II

CS111: PROGRAMMING LANGUAGE II CS111: PROGRAMMING LANGUAGE II Computer Science Department Lecture 1(c): Java Basics (II) Lecture Contents Java basics (part II) Conditions Loops Methods Conditions & Branching Conditional Statements A

More information

Project 2: Sensor Light

Project 2: Sensor Light Project 2: Sensor Light In this session, we will create a sensor light. The behavior we want to implement is as follows: - When the sensor detects human motion, the LED light will be on - When no human

More information

ARDUINO. By Kiran Tiwari BCT 2072 CoTS.

ARDUINO. By Kiran Tiwari BCT 2072 CoTS. ARDUINO By Kiran Tiwari BCT 2072 CoTS www.kirantiwari.com.np SO What is an Arduino? WELL!! Arduino is an open-source prototyping platform based on easy-to-use hardware and software. Why Arduino? Simplifies

More information

Profiling & Optimization

Profiling & Optimization Lecture 18 Sources of Game Performance Issues? 2 Avoid Premature Optimization Novice developers rely on ad hoc optimization Make private data public Force function inlining Decrease code modularity removes

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

ENGR 40M Project 3c: Switch debouncing

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

More information

To enter AT Command mode using an Arduino Uno wired to a HC-05 Bluetooth Module one must first familiarized with the physical Bluetooth Module.

To enter AT Command mode using an Arduino Uno wired to a HC-05 Bluetooth Module one must first familiarized with the physical Bluetooth Module. Configuring Bluetooth HC-05 in AT mode with Arduino Uno The HC-05 module is an easy to use Bluetooth SPP (Serial Port Protocol) module, designed for transparent wireless serial connection setup [1]. In

More information

CMPS 240 Data Structures and Algorithms Test #2 Fall 2017 November 15

CMPS 240 Data Structures and Algorithms Test #2 Fall 2017 November 15 CMPS 240 Data Structures and Algorithms Test #2 Fall 2017 November 15 Name The test has six problems. You ll be graded on your best four answers. 1. Suppose that we wanted to modify the Java class NodeOutDeg1

More information

(A) 99 ** (B) 100 (C) 101 (D) 100 initial integers plus any additional integers required during program execution

(A) 99 ** (B) 100 (C) 101 (D) 100 initial integers plus any additional integers required during program execution Ch 5 Arrays Multiple Choice Test 01. An array is a ** (A) data structure with one, or more, elements of the same type. (B) data structure with LIFO access. (C) data structure, which allows transfer between

More information

Inclusions required for the DMD

Inclusions required for the DMD Sketch for Home Alert The sketch is not large in terms of the line count, but it almost exhausts the Uno s available flash memory thanks to all the included libraries. There is lots of room for memory

More information

Interrupts and Timers

Interrupts and Timers Indian Institute of Technology Bombay CS684/CS308 Embedded Systems Interrupts and Timers E.R.T.S. Lab 1 Lab Objective This lab will introduce you to the use of Timers and Interrupts on the TM4C123GH6PM.

More information

Algorithms & Datastructures Laboratory Exercise Sheet 11

Algorithms & Datastructures Laboratory Exercise Sheet 11 Algorithms & Datastructures Laboratory Exercise Sheet 11 Wolfgang Pausch Heiko Studt René Thiemann Tomas Vitvar

More information

unsigned long NextTelevisonFlicker; // The time the TV light level is changed.

unsigned long NextTelevisonFlicker; // The time the TV light level is changed. // THIS IS THE TEXT SOURcE CODE OF file: Auto_House.ino /* Arduino MICRO software to operate an automated model train home. Written by: Bruce Kingsley Date: July 05, 2014 Version: 1.0.0 Revsion Note: */

More information

Chapter 6 Lab Classes and Objects

Chapter 6 Lab Classes and Objects Lab Objectives Chapter 6 Lab Classes and Objects Be able to declare a new class Be able to write a constructor Be able to write instance methods that return a value Be able to write instance methods that

More information

Mul$- state systems CSCI 255: Introduc/on to Embedded Systems Keith Vertanen Copyright 2011

Mul$- state systems CSCI 255: Introduc/on to Embedded Systems Keith Vertanen Copyright 2011 Mul$- state systems CSCI 255: Introduc/on to Embedded Systems Keith Vertanen Copyright 2011 Overview Avoiding magic numbers Variables takes on a small set of values Use descrip:ve names instead of literal

More information

Data Structures and Object-Oriented Design VIII. Spring 2014 Carola Wenk

Data Structures and Object-Oriented Design VIII. Spring 2014 Carola Wenk Data Structures and Object-Oriented Design VIII Spring 2014 Carola Wenk Collections and Maps The Collection interface is for storage and access, while a Map interface is geared towards associating keys

More information

SENSORS AND MOTORS LAB

SENSORS AND MOTORS LAB SENSORS AND MOTORS LAB Astha Prasad Team F / ADD_IN Teammates: Daniel Berman, Nikhil Baheti, Ihsane Debbache ILR #1 October 16 th, 2015 Individual Progress For the Sensors and Motors lab, I was responsible

More information

Solution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring Instructions:

Solution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring Instructions: VIRG INIA POLYTECHNIC INSTITUTE AND STATE U T PROSI M UNI VERSI TY Instructions: Print your name in the space provided below. This examination is closed book and closed notes, aside from the permitted

More information

Introduction to Arduino Programming. Sistemi Real-Time Prof. Davide Brugali Università degli Studi di Bergamo

Introduction to Arduino Programming. Sistemi Real-Time Prof. Davide Brugali Università degli Studi di Bergamo Introduction to Arduino Programming Sistemi Real-Time Prof. Davide Brugali Università degli Studi di Bergamo What is a Microcontroller www.mikroe.com/chapters/view/1 A small computer on a single chip containing

More information

Marten van Dijk Department of Electrical & Computer Engineering University of Connecticut

Marten van Dijk Department of Electrical & Computer Engineering University of Connecticut ECE3411 Fall 2016 Lecture 4b. Review Session Marten van Dijk Department of Electrical & Computer Engineering University of Connecticut Email: marten.van_dijk@uconn.edu Copied from Lecture 4b, ECE3411 Fall

More information

Airence C Library v1.2 for Windows

Airence C Library v1.2 for Windows Airence C Library v1.2 for Windows Let the Airence control your Radio Automation Software! Document Version 1.2-2014-09-16 D&R Electronica Weesp BV Rijnkade 15B 1382GS Weesp The Netherlands Phone: +31

More information

Chapter 6 Lab Classes and Objects

Chapter 6 Lab Classes and Objects Gaddis_516907_Java 4/10/07 2:10 PM Page 51 Chapter 6 Lab Classes and Objects Objectives Be able to declare a new class Be able to write a constructor Be able to write instance methods that return a value

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