Send commands via bluetooth, e.g. irise app for Android
|
|
- Mercy Joella Higgins
- 6 years ago
- Views:
Transcription
1 /** Sunrise alarm clock Waking up with a sunrise simulation Mood light Send commands via bluetooth, e.g. irise app for Android */ command i20:45z s06:10z dz m1..9e r1z y1z zz tz kz lz bz v1e description Set time of clock Set alarm time, sunrise simulation will start 10 minutes earlier debug mode, enables serial output mood light rainbow mode night mode Reset alarm time Turn alarm off Snooze clear buffers send data back check battery level #include <LiquidCrystal.h> #include <Wire.h> // Required by RTClib #include <RTClib.h> #include <RGBLED.h> // RGB LED functions #include <AlarmClock.h> // Alarm Clock functionality boolean lcdisplay = false; boolean buzz = false; boolean debugging = false; // enable / disable LCD // true: use buzzer // enable / disable debug output static int TIME_OUT = 5; // One of the system's FSM transitions int ALARM_TIMEOUT = 5; // automatic timeout of the alarm LiquidCrystal lcd(12, 6, 5, 4, 3, 2); unsigned long timeref; #define LED_PIN 13 // board LED #define BUZZER_PIN 7 // output PWM pin for the buzzer // When Sig Output is high, touch sensor is being pressed #define CTS_PIN 8 // Pin for capactitive touch sensor // bluetooth communication String instring = ""; int bluetoothval; // value sent over via bluetooth int lastvalue; int lastvalue2;
2 // modes boolean rainbow = false; boolean night = false; // rainbow simulation // night mode RGBLED rgbled; AlarmClock alarmclock; void setup() { pinmode(buzzer_pin, OUTPUT); // Buzzer pin if( lcdisplay ) { lcd.begin(16, 2); lcd.clear(); printonlcd("sunrise clock ready.", 0, 0); // Uncomment this to set the current time on the RTC module //alarmclock.getrtc().adjust(datetime( DATE, TIME )); // required for bluetooth Serial.begin(9600); if( debugging) Serial.println(F("Setup alarm clock OK")); pinmode(led_pin, OUTPUT); // board LED // setup() // default alarm time alarmclock.setalarmhour( 6 ); alarmclock.setalarmminute( 0 ); void loop() { timeref = millis(); // uses the current state to decide what to process switch( alarmclock.getstate() ) { case AlarmClock::SHOW_TIME: decodevalue(); showtime(); checkmode(); incomingmessage(); case AlarmClock::SHOW_TIME_ALARM_ON: checkalarmtime(); decodevalue(); showtime(); checkmode(); incomingmessage(); case AlarmClock::SHOW_ALARM_TIME: decodevalue();
3 showalarmtime(); case AlarmClock::SUNRISE_ON: checkalarmtime(); readcapacitativetouchsensor(); decodevalue(); showtime(); rgbled.simulatesunrise(1000, 1); case AlarmClock::BUZZER_ON: checkalarmtime(); readcapacitativetouchsensor(); decodevalue(); showtime(); case AlarmClock::STOP_ALARM: turnalarmoff(); showtime(); // loop() // decode the value received via bluetooth // trigger further actions void decodevalue() { while (Serial.available() > 0) { int inchar = Serial.read(); switchboardled(inchar); if( inchar=='s' ) { // set alarm if( debugging) Serial.println(F("Set alarm.")); if( alarmclock.alarmset() ) { else { else if( lastvalue=='s') { instring += (char)inchar; if( instring.length()==5 ) { Serial.print(F("Set alarm: ")); Serial.println(inString); Serial.println(String(inString.charAt(0)) + String(inString.charAt(1)) + String(":") + String(inString.charAt(3)) + String(inString.charAt(4)) ); String ah = String(inString.charAt(0)) + String(inString.charAt(1)); alarmclock.setalarmhour( ah.toint() );
4 if( alarmclock.getalarmhour()<0 alarmclock.getalarmhour()>24) { alarmclock.setalarmhour( -1 ); if( debugging ) Serial.println(F("Alarm time invalid, reset to -1")); else { if( debugging ) { Serial.print(F("Alarm hours set to: ")); Serial.println(aH); String am = String(inString.charAt(3)) + String(inString.charAt(4)); alarmclock.setalarmminute( am.toint() ); if( alarmclock.getalarmminute()<0 alarmclock.getalarmminute()>60) { if( debugging ) Serial.println(F("Alarm time invalid, reset to -1")); alarmclock.setalarmminute( -1 ); else { if( debugging ) { Serial.print(F("Alarm minutes set to: ")); Serial.println(aM); if( alarmclock.alarmset() ) { rgbled.off(); rgbled.setcolor(80, 0, 80); //rgbled.blink(3, 80, 0, 80); // indicate alarm set else { if( inchar=='z' ) { // reset alarm resetalarm(); if( inchar=='t' ) { // alarm off alarmclock.setstate( AlarmClock::STOP_ALARM ); if( inchar=='k' ) { // snooze
5 if( debugging) Serial.println(F("Snooze.")); if( alarmclock.getstate() == AlarmClock::SUNRISE_ON alarmclock.getstate() == AlarmClock::BUZZER_ON ) { alarmclock.snoozemode(); alarmclock.setsnooze( true ); analogwrite(buzzer_pin, 0); if( inchar=='i' ) { // time to set if( debugging) Serial.println(F("Set time.")); if( alarmclock.alarmset() ) { else { else if( lastvalue=='i') { instring += (char)inchar; if( instring.length()==5 ) { Serial.print(F("Set time: ")); Serial.println(inString); Serial.println(String(inString.charAt(0)) + String(inString.charAt(1)) + String(":") + String(inString.charAt(3)) + String(inString.charAt(4)) + String(":00")); String timetoset = String(inString.charAt(0)) + String(inString.charAt(1)) + String(":") + String(inString.charAt(3)) + String(inString.charAt(4)) + String(":00"); alarmclock.setrtctime( timetoset ); if( alarmclock.alarmset() ) { else { //rgbled.blink(3, 173,255,47); // indicate time set rgbled.setcolor(173,255,47); rgbled.off();
6 if( inchar=='r' ) { // rainbow mode else if( lastvalue=='r') { instring += (char)inchar; switchrainbowmode(instring); if( inchar=='b' ) { // send time data to irise app sendtimes(); instring = ""; lastvalue=0; if( inchar=='d' ) { // debug mode if( debugging ) debugging=false; else debugging = true; Serial.print(F("Debugging: ")); Serial.println( debugging? String("yes") : String("no") ); if( inchar=='l' ) { // clear buffers if( debugging) Serial.println(F("Clear buffers.")); if( inchar=='m' ) { // mood light if( debugging) Serial.println(F("Mood light.")); else if( lastvalue=='m' ) { instring += (char)inchar; int type = instring.toint(); rgbled.moodlight(type); if( inchar=='y' ) { // night mode else if( lastvalue=='y') { instring += (char)inchar; switchnightmode(instring); // a z marks the end of a command received via bluetooth if (inchar == 'z') { Serial.println(F("End.")); // clear the string for new input:
7 return; // while // decodevalue() void readcapacitativetouchsensor() { int ctsvalue = digitalread(cts_pin); if( ctsvalue == HIGH ) { alarmclock.setstate( AlarmClock::STOP_ALARM ); digitalwrite(led_pin, LOW); if( debugging ) Serial.println(F("TOUCHED")); // readcapacitativetouchsensor() // Looks at the provided trigger (event) // and performs the appropriate state transition // If necessary, sets secondary variables void transition(uint8_t trigger) { switch( alarmclock.getstate() ) { case AlarmClock::SHOW_TIME: case AlarmClock::SHOW_TIME_ALARM_ON: if( trigger == ALARM_TIME_ALMOST_MET ) { rgbled.setsunrisestate( RGBLED::OFF_RED ); rgbled.simulatesunrise(1000, 1); alarmclock.setstate( AlarmClock::SUNRISE_ON ); activatetouchsensor(); if ( trigger == ALARM_TIME_MET ) { beep(); alarmclock.setstate( AlarmClock::BUZZER_ON ); rgbled.setcolor(0,0,0); case AlarmClock::SHOW_ALARM_TIME: if ( trigger == TIME_OUT ) { if (!alarmclock.getalarm() ) else alarmclock.setstate( AlarmClock::SHOW_TIME_ALARM_ON); case AlarmClock::BUZZER_ON: if( alarmclock.getsnooze() ) { analogwrite(buzzer_pin, 0); alarmclock.snoozemode(); if ( trigger == TIME_OUT ) { switchshowtime(); case AlarmClock::SUNRISE_ON:
8 if( alarmclock.getsnooze() ) { alarmclock.snoozemode(); if ( trigger == TIME_OUT ) { switchshowtime(); case AlarmClock::STOP_ALARM: turnalarmoff(); switchtime(1); switchshowtime(); // transition() void sendtimes() { String str; str = "h"; str += String(alarmClock.getNow().hour()); str += "m"; str += String(alarmClock.getNow().minute()); str += "a"; str += String(alarmClock.getAlarmHour()); str += "b"; str += String(alarmClock.getAlarmMinute()); str += "\n"; Serial.println(str); Serial.print( F("Data sent to irise app: ") ); Serial.println( str ); // sendtimes() void checkmode() { if( rainbow == true ) { rgbled.rainbow_fade(1000, 1); if( night == true ) { rgbled.nightmode(1000, 1); // checkmode() void switchboardled(int mode) { if (mode=='n') { digitalwrite(led_pin, HIGH); if (lastvalue!='n') if( debugging) Serial.println(F("Board LED is on")); lastvalue=mode; else if (mode=='f') {
9 digitalwrite(led_pin, LOW); if (lastvalue!='f') if( debugging) Serial.println(F("Board LED is off")); lastvalue=mode; // switchboardled() void switchrainbowmode(string mode) { Serial.print(F("Rainbow: ")); Serial.println(mode); if( mode=="0" ) { rainbow = false; digitalwrite(led_pin,low); //rgbled.setcolor(255,255,255); rgbled.off(); if( mode=="1" ) { rainbow = true; digitalwrite(led_pin,high); // switchrainbowmode() void switchnightmode(string mode) { Serial.print(F("Night mode: ")); Serial.println(mode); if( mode=="0" ) { night = false; digitalwrite(led_pin, LOW); //rgbled.setcolor(255,255,255); rgbled.off(); if( mode=="1" ) { night = true; digitalwrite(led_pin, HIGH); // switchnightmode() void switchshowtime() { if (!alarmclock.alarmset() ) { else { // switchshowtime() void switchtime(int mode) { Serial.print(F("Show alarm time: "));
10 Serial.println(mode); if(mode==0) { if(mode==1) { alarmclock.setstate( AlarmClock::SHOW_ALARM_TIME ); // switchtime() void resettime() { if( debugging) Serial.println(F("Reset alarm time.")); alarmclock.resettime(); digitalwrite(led_pin, LOW); switchshowtime(); void turnalarmoff() { // turn alarm off if( debugging) Serial.println(F("Turn alarm off.")); alarmclock.setalarm( false ); digitalwrite(led_pin, LOW); digitalwrite(buzzer_pin, LOW); deactivatetouchsensor(); // turnalarmoff() void resetalarm() { if( debugging) Serial.println(F("Reset alarm time.")); alarmclock.setalarmhour( -1 ); alarmclock.setalarmminute( -1 ); alarmclock.setalarm( false ); digitalwrite(led_pin, LOW); // resetalarm() // Checks if the alarm time has been met, // and if so initiates a state transition void checkalarmtime() { int hz = -1; int mz = -1; int h = alarmclock.getnow().hour(); int m = alarmclock.getnow().minute(); // sunrise if( (alarmclock.getalarmminute() - BEFORE) < 0 ) { mz = 60 + (alarmclock.getalarmminute()-before); hz = alarmclock.getalarmhour()-1;
11 else { mz = alarmclock.getalarmminute()-before; hz = alarmclock.getalarmhour(); if ( h == hz && m == mz ) { if( alarmclock.getsnooze() ) alarmclock.setsnooze( false ); transition(alarm_time_almost_met); // buzzer if( buzz ) { if ( h == hz && m == alarmclock.getalarmminute() ) { if( alarmclock.getsnooze() ) alarmclock.setsnooze( false ); transition(alarm_time_met); // stop alarm automatically if( (alarmclock.getalarmminute() + ALARM_TIMEOUT) >= 60 ) { mz = alarmclock.getalarmminute() + ALARM_TIMEOUT - 60; hz = alarmclock.getalarmhour()+1; else { mz = alarmclock.getalarmminute() + ALARM_TIMEOUT; hz = alarmclock.getalarmhour(); if ( h == hz && m == mz ) { if( alarmclock.getsnooze() ) alarmclock.setsnooze( false ); transition(alarmclock::stop_alarm); // checkalarmtime() void activatetouchsensor() { pinmode(cts_pin, INPUT); void deactivatetouchsensor() { digitalwrite(cts_pin, LOW); void resetbuffers() { instring = ""; lastvalue=0; lastvalue2 = 0; // resetbuffers() // LCD functions void clearlcdline(int zeile) { lcd.setcursor(0,zeile); lcd.print(" "); // clearlcdline() void printonlcd(string text, int zeile, int pos) {
12 lcd.setcursor(pos, zeile); lcd.print(text); // printonlcd() void beep() { for( int i=0; i<5; i++ ) { digitalwrite(buzzer_pin, 220); delay(200); digitalwrite(buzzer_pin, 0); // Displays the current date and time, and also an alarm indication // e.g. SAT 04 JAN 2014, 22:59:10 ALARM void showtime() { boolean alarmtimeset = false; if( alarmclock.getalarmhour()!=-1 && alarmclock.getalarmminute()!=-1 ) alarmtimeset = true; // e.g. SAT 04 JAN 2014, 22:59:10 ALARM // e.g ALARM, 22:59:10 06:10 alarmclock.setnow( alarmclock.getrtc().now() ); if( lcdisplay ) { const char* dayname[] = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" ; const char* monthname[] = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" ; lcd.clear(); lcd.print( String("")+(alarmClock.getNow().day() < 10? "0" : "") + alarmclock.getnow().day() + "." + (alarmclock.getnow().month() < 10? "0" : "") + alarmclock.getnow().month() + "." + alarmclock.getnow().year() + (alarmtimeset? " ALARM" : "")); lcd.setcursor(0,1); String alarmtime = String(" ") + String(alarmClock.getAlarmHour()) + ":" + String(alarmClock.getAlarmMinute()); lcd.print((alarmclock.getnow().hour() < 10? "0" : "") + String(alarmClock.getNow().hour()) + ":" + (alarmclock.getnow().minute() < 10? "0" : "") + alarmclock.getnow().minute() + ":" + (alarmclock.getnow().second() < 10? "0" : "") + alarmclock.getnow().second() + (alarmtimeset? alarmtime : "" )); // showtime() // Displays the current alarm time and transitions back to show // date and time after 2 sec (+ 1 sec delay from inside the loop function) // e.g. Alarm Time HOUR: 08 MIN: 20 void showalarmtime() { if( lcdisplay ) { Serial.print(F("Show alarm time: ")); Serial.println(String(alarmClock.getAlarmHour()) + ":" + String(alarmClock.getAlarmMinute()));
13 lcd.clear(); lcd.print("alarm Time"); lcd.setcursor(0,1); lcd.print(string("hour: ") + ( alarmclock.getalarmhour()<= 9? "0" : "" ) + alarmclock.getalarmhour() + " MIN: " + ( alarmclock.getalarmminute()<= 9? "0" : "" ) + alarmclock.getalarmminute()); delay(2000); transition( TIME_OUT ); // showalarmtime()
loop switch ( ) { case STATE_INIT: // // break; case STATE_SETTING: // // break; case STATE_COUNTDOWN: // // break; case STATE_PAUSE: // // break;
2 3 4 loop switch ( ) { case STATE_IIT: break; case STATE_SETTIG: break; case STATE_COUTDOW: break; case STATE_PAUSE: break; case STATE_ALARM: break; default: break; 5 6 7 case STATE_IIT : displaytimer(time,
More informationLab 3 XBees and LCDs and Accelerometers, Oh My! Part 1: Wireless Communication Using XBee Modules and the Arduino
University of Pennsylvania Department of Electrical and Systems Engineering ESE 205 Electrical Circuits and Systems Laboratory I Lab 3 XBees and LCDs and Accelerometers, Oh My! Introduction: In the first
More informationWorkshop Arduino English starters workshop 2
Workshop Arduino English starters workshop 2 We advice to finish part 1 of this workshop before following this one. There are a set of assignments in this workshop that can be taken individually. First
More information#define CE_PIN 12 //wireless module CE pin #define CSN_PIN 13 //wireless module CSN pin. #define angleaveragenum 1
/***************************************************************************************************** define statements *****************************************************************************************************/
More informationLab 4 LCDs and Accelerometers
University of Pennsylvania Department of Electrical and Systems Engineering ESE 111 Intro to Electrical/Computer/Systems Engineering Lab 4 LCDs and Accelerometers Introduction: In this lab, will learn
More informationLAMPIRAN I (LISTING PROGRAM)
LAMPIRAN I (LISTING PROGRAM) #include LiquidCrystal lcd(8, 9, 4, 5, 6, 7); const int numreadings = 10; int readings[numreadings]; // the readings from the analog input int readindex =
More informationAppendix A Requirement and Verification Table
Appendix A Requirement and Table Table X System Requirements and s Buttons and LED Requirements 1. Buttons must be easily press able and accessible by the user. 2. LED must be visible from up to 15 ft
More informationAIMMS Function Reference - Date Time Related Identifiers
AIMMS Function Reference - Date Time Related Identifiers This file contains only one chapter of the book. For a free download of the complete book in pdf format, please visit www.aimms.com Aimms 3.13 Date-Time
More informationLaboratory 5 Communication Interfaces
Laboratory 5 Communication Interfaces Embedded electronics refers to the interconnection of circuits (micro-processors or other integrated circuits) with the goal of creating a unified system. In order
More informationJava Programming Language Mr.Rungrote Phonkam
5 Java Programming Language Mr.Rungrote Phonkam rungrote@it.kmitl.ac.th Contents 1. Expressions 2. Control Flow 2.1 Condition 2.2 Multiple Branch 2.3 Lopps 2.4 Jump ก ก 1. Expressions ก ก ก ก ก 5/b%2+10;
More informationARDUINO. 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 informationThe speaker connection is circled in yellow, the button connection in red and the temperature sensor in blue
Connections While the board can be connected to a number of different Arduino versions I chose to use the Pro Mini as I wanted the completed unit to be fairly small. The Mini and the MP3 board run on 5
More information// sets the position of cursor in row and column
CODE: 1] // YES_LCD_SKETCH_10_14_12 #include //lcd(rs, E, D4, D5, D6, D7) LiquidCrystal lcd(8, 9, 4, 5, 6, 7); int numrows = 2; int numcols = 16; void setup() Serial.begin(9600); lcd.begin(numrows,
More informationComputer Architectures
Implementing the door lock with Arduino Gábor Horváth 2017. február 24. Budapest associate professor BUTE Dept. Of Networked Systems and Services ghorvath@hit.bme.hu Outline Aim of the lecture: To show
More informationBatteryStats.com Page 1 of 9
[localhost:~] weiher% date >> /Users/weiher/Documents/Terminal- Unix/BatteryStats.Dat [localhost:~] weiher% ioreg -l grep -i IOBatteryInfo >> /Users/weiher/Documents/Terminal-Unix/BatteryStats.Dat [localhost:~]
More information76 days Wed 8/24/16 Wed 12/7/16 Daniel Wang,Shreyas Makde,Madhavi Potluri,Roua 2 Requirements analysis 11 days Wed 8/24/16 Wed 9/7/16
ID Mode Name Duration Start Finish Predecessors Resource Names 1 OpenWells Cross-Platform Mobile Application 76 days Wed 8/24/16 Wed 12/7/16 Daniel Wang,Shreyas Makde,Madhavi 2 Requirements analysis 11
More informationFUNCTIONS USED IN CODING pinmode()
FUNCTIONS USED IN CODING pinmode() Configures the specified pin to behave either as an input or an output. See the description of digital pins for details on the functionality of the pins. As of Arduino
More informationInclusions 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 informationDesigned & 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 informationBarry the Plant Watering Robot
Barry the Plant Watering Robot We are going to create the controller board for Barry, a robot who will do some of our plant watering chores for us. We aren t going to build all of Barry, but this will
More informationEnergia MSP-430!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1
Energia MSP-430 1 3 Energia 4 4 4 6 8 9 Energia 11 18 2 IIB Energia MSP-430 IIB C C++ 3 Energia Energia MSP-430 Windows Mac OS Linux MSP-430, http://www.energia.nu, Max OS X, windows Linux Mac OS X, energia-
More informationLecture Notes: ESC 101
Lecture Notes: ESC 101 Date: 26/02/2008 // Program to Display calendar of a given month import java.util.scanner; class Year int year; Year() this.year=2000; Year(int y) year=(y>1900)? y:1900; //if year
More information<Table of content> <Parts and description> <Circuit board Guide> <Pins> <Basics of Coding> <Intro to Arduino> <Intro> <Downloading Arduino IDO>
http://www.arduino.cc/
More informationCS Programming I: Arrays
CS 200 - Programming I: Arrays Marc Renault Department of Computer Sciences University of Wisconsin Madison Fall 2017 TopHat Sec 3 (PM) Join Code: 719946 TopHat Sec 4 (AM) Join Code: 891624 Array Basics
More informationData Types. 9. Types. a collection of values and the definition of one or more operations that can be performed on those values
Data Types 1 data type: a collection of values and the definition of one or more operations that can be performed on those values C++ includes a variety of built-in or base data types: short, int, long,
More information1 single digit Nixie clock
1 single digit Nixie clock by Jānis Alnis 2014-2016 Young people are fascinated by Nixies. They have not seen such neon lights in the present solid-state era. IN-18 is the largest neon digit indicator
More informationI n t e r a c t i v e HA u t o m a t a _. Programming for Engineers Winter Andreas Zeller, Saarland University
I n t e r a c t i v e HA u t o m a t a _ Programming for Engineers Winter 2015 Andreas Zeller, Saarland University Today s Topics Strings Interaction Automata A Purchase Select Product Insert Coins Dispense
More informationType Definition. C Types. Derived. Function Array Pointer Structure Union Enumerated. EE 1910 Winter 2017/18
Enum and Struct Type Definition C Types Derived Function Array Pointer Structure Union Enumerated 2 tj Type Definition Typedef Define a new Type Inherits members and operations from a standard or previously
More informationrobotics/ openel.h File Reference Macros Macro Definition Documentation Typedefs Functions
openel.h File Reference Macros #define EL_TRUE 1 #define EL_FALSE 0 #define EL_NXT_PORT_A 0 #define EL_NXT_PORT_B 1 #define EL_NXT_PORT_C 2 #define EL_NXT_PORT_S1 0 #define EL_NXT_PORT_S2 1 #define EL_NXT_PORT_S3
More information/* ///////////////////////////////////////////////////////////////////////////////////////////////////////REAL- TIME CLOCK MODULE DS1307 */
////////////////////////////////////////////////////////////////////////////////////////////////////MENU_CONTROLLER_UNO ///////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////MENU_CONTROLLER_UNO
More informationArrays III and Enumerated Types
Lecture 15 Arrays III and Enumerated Types Multidimensional Arrays & enums CptS 121 Summer 2016 Armen Abnousi Multidimensional Arrays So far we have worked with arrays with one dimension. Single dimensional
More informationArduino 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 informationExam 2 ITEC 120 Principles of Computer Science I Spring: 2017
Exam 2 ITEC 120 Principles of Computer Science I Spring: 2017 I will abide by the Radford University Honor Code. Name Signature On this exam, you may NOT use already written methods such as Character class
More information#include <Keypad.h> int datasens; #define pinsens 11. const byte ROWS = 4; //four rows const byte COLS = 3; //three columns
#include int datasens; #define pinsens 11 const byte ROWS = 4; //four rows const byte COLS = 3; //three columns char keys[rows][cols] = '1','2','3', '4','5','6', '7','8','9', '*','0','#' ; byte
More informationWhat s inside the kit
What s inside the kit 1 set Jumper Wires 5 pcs Tact Switch 1 pc Photoresistor 1 pc 400 Points Breadboard 1 pc Potentiometer 1 pc LCD 5 pcs 5mm Red LED 5 pcs 5mm Green LED 5 pcs 5mm Yellow LED 30 pcs Resistors
More informationCreate your own wireless motion sensor with
Create your own wireless motion sensor with Arduino If you have a friend that has an alarm system in his or her home, I am sure you ve all seen these white motion sensors that are usually fixed above doors
More informationArduino: LCD Diagrams & Code Brown County Library
Arduino: LCD Diagrams & Code Project 01: Hello, World! Components needed: Arduino Uno board breadboard 16 jumper wires 16x2 LCD screen 10k potentiometer /* LCD 01 : Hello World! Source: Code adapted from
More informationThis report is based on sampled data. Jun 1 Jul 6 Aug 10 Sep 14 Oct 19 Nov 23 Dec 28 Feb 1 Mar 8 Apr 12 May 17 Ju
0 - Total Traffic Content View Query This report is based on sampled data. Jun 1, 2009 - Jun 25, 2010 Comparing to: Site 300 Unique Pageviews 300 150 150 0 0 Jun 1 Jul 6 Aug 10 Sep 14 Oct 19 Nov 23 Dec
More informationNORTHWEST. Course Schedule: Through June 2018 MICROSOFT ACCESS. Access 2016 / Access 2010 / Last Revised: 11/13/2017
2659 Commercial Street SE, Suite 210 Salem, Oregon 97302 The Professional s Choice since 1983 Locally Owned & Operated Course Schedule: Through June 2018 Last Revised: 11/13/2017 Phone: (503) 362-4818
More informationFixed bug on Digital output priority handling. Fixed bug in volume sensors with gallons unit measure. Memory Module GPS Module
Page 1 01.26.46 Dec, 5 2018 Added management of Shift Light Module No changes 01.26.38 Oct, 5 2018 Added possibility to force channels in Online Fixed bug on Digital output priority handling No changes
More informationAdvancing the Art of Internet Edge Outage Detection
Advancing the Art of Internet Edge Outage Detection ACM Internet Measurement Conference 2018 Philipp Richter MIT / Akamai Ramakrishna Padmanabhan University of Maryland Neil Spring University of Maryland
More information//Added Band selection switch and User configurable IF for BITX by KD2ETS-modi //Removed non standard increment frequency//
//Added Band selection switch and User configurable IF for BITX by KD2ETS-modi //Removed non standard increment frequency// // Include the library code #include #include //Setup
More information- 1 - /*Code for data logging for Arduino with Atmega328 chip and 3 differential pressure
- 1 - Software code /*Code for data logging for Arduino with Atmega328 chip and 3 differential pressure sensors MPX5100DP mounted on tensiometers for monitoring water potential in soils. After powering,
More informationLab 8. Arduino and WiFi - IoT applications
Lab 8. Arduino and WiFi - IoT applications IoT - Internet of Things is a recent trend that refers to connecting smart appliances and electronics such as microcontrollers and sensors to the internet. In
More informationAsks for clarification of whether a GOP must communicate to a TOP that a generator is in manual mode (no AVR) during start up or shut down.
# Name Duration 1 Project 2011-INT-02 Interpretation of VAR-002 for Constellation Power Gen 185 days Jan Feb Mar Apr May Jun Jul Aug Sep O 2012 2 Start Date for this Plan 0 days 3 A - ASSEMBLE SDT 6 days
More informationADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C
Data Sheet 10 Channel Analog to Digital Converter with output via I 2 C Introduction Many microcontroller projects involve the use of sensors like Accelerometers, Gyroscopes, Temperature, Compass, Barometric,
More informationSearch YouTube for 'WB7FHC' to see several videos of this project as it was developed.
/*********************************************************************** WB7FHC's Morse Code Decoder v. 1.1 (c) 2014, Budd Churchward - WB7FHC This is an Open Source Project http://opensource.org/licenses/mit
More informationsoftware.sci.utah.edu (Select Visitors)
software.sci.utah.edu (Select Visitors) Web Log Analysis Yearly Report 2002 Report Range: 02/01/2002 00:00:0-12/31/2002 23:59:59 www.webtrends.com Table of Contents Top Visitors...3 Top Visitors Over Time...5
More informationARDUINO EXPERIMENTS ARDUINO EXPERIMENTS
ARDUINO EXPERIMENTS IR OBSTACLE SENSOR... 3 OVERVIEW... 3 OBJECTIVE OF THE EXPERIMENT... 3 EXPERIMENTAL SETUP... 3 IR SENSOR ARDUINO CODE... 4 ARDUINO IDE SERIAL MONITOR... 5 GAS SENSOR... 6 OVERVIEW...
More informationProject 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 informationLaboratory 4 Usage of timers
Laboratory 4 Usage of timers 1. Timer based interrupts Beside external interrupt, the MCU responds to internal ones which are triggered by external events (on the external pins). The source of the internal
More informationRuntastic Orbit Product Training Packaging
Packaging Art. No.: RUNOR1 Package Contents PU Band Silicon Clip Charging Cable Art. No.: RUNORST1 Art. No.: RUNORST2 Wearing the Runtastic Orbit Runtastic Orbit Product Training Device Description Ambient
More informationMemory Module. GS-Dash Formula Steering Wheel 3. GPS Module Lambda Channel Expansion/TC Hub Remote buttons interface
Page 1 01.26.28 Apr, 12 2018 Added remote display management 01.26.22 01.26.28 01.26.28 35.58 25.47 40.61 70.03 Memory Module GS-Dash Formula Steering Wheel 3 01.26.25 Jan 11 2018 Fixed bug when e Start
More informationSWITCH 10 KILOHM RESISTOR 220 OHM RESISTOR POTENTIOMETER LCD SCREEN INGREDIENTS
11 SWITCH 10 KILOHM RESISTOR 220 OHM RESISTOR POTENTIOMETER LCD SCREEN INGREDIENTS 115 CRYSTAL BALL CREATE A CRYSTAL BALL TO TELL YOUR FUTURE Discover: LCD displays, switch/case statements, random() Time:
More informationLojamundi Tecnologia Sem Limites br
IR Remote Aprenda a fazer um controle remoto com arduino Sobre esse artigo Autor: aaron aaron@cubietech.com 2014/02/27 20:49 Copyrights: CC Attribution-Share Alike 3.0 Unported Contribuidores: Cubieboard
More informationService Bulletin List SB No. Link Button
Page 1 / 4 Go! WAT-197 14-Oct-1998 QW-1737 LOSE TIME OR STOPPAGE OF HANDS Go! WAT-198 2-Aug-1999 QW-1750 (AW-61) (REVISION) Go! WAT-199 17-Aug-1999 QW-1337 Go! WAT-200 9-Dec-1999 QW-1470/1471 (PRT- 40SERIES)
More informationICT PROFESSIONAL MICROSOFT OFFICE SCHEDULE MIDRAND
ICT PROFESSIONAL MICROSOFT OFFICE SCHEDULE MIDRAND BYTES PEOPLE SOLUTIONS Bytes Business Park 241 3rd Road Halfway Gardens Midrand Tel: +27 (11) 205-7000 Fax: +27 (11) 205-7110 Email: gauteng.sales@bytes.co.za
More informationPointer Arithmetic and Lexical Scoping. CS449 Spring 2016
Pointer Arithmetic and Lexical Scoping CS449 Spring 2016 Review Pitfall 1 from previous lecture void foo(char *s) { s = "World"; int main() { char *str = "Hello"; foo(str); printf("%s\n", str); return
More informationLaboratory 3 Working with the LCD shield and the interrupt system
Laboratory 3 Working with the LCD shield and the interrupt system 1. Working with the LCD shield The shields are PCBs (Printed Circuit Boards) that can be placed over the Arduino boards, extending their
More informationRS485 Sensor Node V1.0 (SKU:DFR0233)
RS485 Sensor Node V1.0 (SKU:DFR0233) Contents 1 Introduction 2 Application 3 Specification 4 Pin Out 4.1 More details 5 Product Directive 6 Connecting Diagram 7 Sample Code Introduction This RS-485 Sensor
More informationSCHEDULED PROGRAMMES/COURSES APRIL 2017 MARCH 2018 (MIND KINGSTON / MANDEVILLE CAMPUSES & MONTEGO BAY)
SCHEDULED PROGRAMMES/ IL CH 2 SCHEDULED PROGRAMMES/ IL CH Award Categories Certificate Advanced Records (Modules 1 5)** Auditing Fundamentals Level 1: Modules 1 4 (NEW) Budget Preparation & Effective Corporate
More informationDefinition: Data Type A data type is a collection of values and the definition of one or more operations on those values.
Data Types 1 Definition: Data Type A data type is a collection of values and the definition of one or more operations on those values. Base Data Types All the values of the type are ordered and atomic.
More informationDual rocket altimeter using the ATmega 328 microcontroller. The AltiDuo
Dual rocket altimeter using the ATmega 328 microcontroller The AltiDuo Version date Author Comments 1.0 29/12/2012 Boris du Reau Initial Version Boris.dureau@neuf.fr 1.1 17/02/2013 Boris du Reau Updated
More informationPackage taskscheduler
Type Package Package taskscheduler November 16, 2017 Title Schedule R Scripts and Processes with the Windows Task Scheduler Schedule R scripts/processes with the Windows task scheduler. This allows R users
More informationPennington County Government Justice Center. Schematic Design - October 27, 2015
Government Schematic Design - October 27, 2015 N Architecture 2 Proposed - Site Plan Proposed Jail / LEC Addition Proposed Addition 3 County Board Room Public Entrance County Attorney Proposed - Ground
More informationTrinket RGB Shield Clock
Trinket RGB Shield Clock Created by Mike Barela Last updated on 2016-02-07 09:38:15 PM EST Guide Contents Guide Contents Overview Libraries Getting Ready Hook-up Code Use and Going Further Use It! Going
More informationI I. I I Wed 28-Jan-I WW1 - External Data I. EPF 29.5 Water Results. Consent of copyright owner required for any other use.
~ EPF 29.5 Water Results 2. WW1 - External Data Frequency Parameter Week Day Date 2Mon 05-Jan-5. 1 06-Jan-5 [Wed ] 07-Jan-5 [Thu 1 08-Jan-5 Fri 09-Jan-5 O-Jan- 5 1 -Jan- 5 3 Mon 12-Jan- 5 ]Tue 13-Jan-5
More informationAppKit: Using the DS1302 Trickle Charge Timekeeping Chip
AppKit: Using the DS1302 Trickle Charge Timekeeping Chip This AppKit shows how to use the Dallas Semiconductor DS1302 Trickle Charge Timekeeping Chip with the Parallax BASIC Stamp II single-board computer
More information3.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 informationGrove - Buzzer. Introduction. Features
Grove - Buzzer Introduction The Grove - Buzzer module has a piezo buzzer as the main component. The piezo can be connected to digital outputs, and will emit a tone when the output is HIGH. Alternatively,
More informationHigh Performance Computing
High Performance Computing MPI and C-Language Seminars 2009 Photo Credit: NOAA (IBM Hardware) High Performance Computing - Seminar Plan Seminar Plan for Weeks 1-5 Week 1 - Introduction, Data Types, Control
More informationGoldSTEM.org. Growing the Future
GoldSTEM.org Growing the Future GoldSTEM_Lesson_ tm 3-24-2016 17_Time_Date_and_Temperature_to_Terminal Lessons should be done in sequence, start off with lesson 4. Each lessons builds on what was learned
More information10/16/2016 CPET 490 SENIOR DESIGN PROJECT PHASE I ANDROID GOLF STATISTICS TRACKER. Brad Sorensen Kory Martin PROJECT SUMMARY
CPET 490 SENIOR DESIGN PROJECT PHASE I ANDROID GOLF STATISTICS TRACKER Brad Sorensen Kory Martin PROJECT SUMMARY 1 Project Summary Allow users to track and analyze statistical information about their golf
More informationSection 1.2: What is a Function? y = 4x
Section 1.2: What is a Function? y = 4x y is the dependent variable because it depends on what x is. x is the independent variable because any value can be chosen to replace x. Domain: a set of values
More informationData Types H&K Chapter 7. Instructor - Andrew S. O Fallon CptS 121 (October 17, 2018) Washington State University
Data Types H&K Chapter 7 Instructor - Andrew S. O Fallon CptS 121 (October 17, 2018) Washington State University Data Types We already know that: Data type = set of values + set of operations on those
More informationDecision Making Information from Your Mobile Device with Today's Rockwell Software
Decision Making Information from Your Mobile Device with Today's Rockwell Software PUBLIC Rockwell Automation TechED 2016 @ROKTechED #ROKTechED Copyright 2016 Rockwell Automation, Inc. All Rights Reserved.
More informationMutation Testing. How good your tests are
Mutation Testing How good your tests are 2017 whoami ios Developer by day compiler hacker by night https://twitter.com/1101_debian https://lowlevelbits.org https://systemundertest.org Mars Climate Orbiter
More informationSCHEDULED PROGRAMMES/COURSES APRIL 2018 MARCH 2019 (MIND KINGSTON / MANDEVILLE CAMPUSES & MONTEGO BAY)
SCHEDULED PROGRAMMES/ IL CH 2 SCHEDULED PROGRAMMES/ IL CH Award Categories Certificate Advanced Records : Modules 1 5** Audit Fundamentals: Modules 1 4 Budget Preparation & Effective Corporate Governance
More informationConnecting 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 informationE11 Lecture 4: More C!!! Profs. David Money Harris & Sarah Harris Fall 2011
E11 Lecture 4: More C!!! Profs. David Money Harris & Sarah Harris Fall 2011 Outline Logistics Serial Input Physical Inputs/Outputs Randomness Operators Control Statements Logistics Logistics Tutoring hours:
More informationA Hybrid Constraint Programming Approach to Nurse Rostering Problem
A Hybrid Constraint Programming Approach to Nurse Rostering Problem Fang He*, Dr. Rong Qu The Automated Scheduling, Optimisation and Planning (ASAP) research group School of Computer Science University
More informationC Structures, Unions, Bit Manipulations, and Enumerations
C Structures, Unions, Bit Manipulations, and Enumerations Chih-Wei Tang ( 唐之瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan Outline 10.2 Structure Definitions 10.4
More informationEng.mohammed Albhaisi. Lab#3 : arduino to proteus simulation. for simulate Arduino program that you wrote you have to have these programs :
Lab#3 : arduino to proteus simulation for simulate Arduino program that you wrote you have to have these programs : 1-Arduino C 2-proteus 3- Virtual Serial Port Driver 4-Arduino library to proteus You
More informationElectronic 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 informationCMIS 102 Hands-On Lab
CMIS 10 Hands-On Lab Week 8 Overview This hands-on lab allows you to follow and experiment with the critical steps of developing a program including the program description, analysis, test plan, and implementation
More informationReview. VHDL in Action. This week. Lexical Elements. Literals. More Literals. Concurrent statements Conditional and selected signal assignments
Review Concurrent statements Conditional and selected signal assignments Cannot be placed inside a process Equivalent to some process Assert statement Debugging VHDL in Action Chapter 3 Chapter 5, Section
More informationOverview. Exploration: LED Ramp Light. cs281: Introduction to Computer Systems Lab04 K-Maps and a Sensor/Actuator Circuit
cs281: Introduction to Computer Systems Lab04 K-Maps and a Sensor/Actuator Circuit Overview In this lab, we will use the K-maps from last lab to build a circuit for the three lights based on three bit
More information// Press and hold TXsim button and select antenna with left or right button. // Press and hold left and right button to reset EEPROM
// This sketch will decode ICOM CI-V frequency information // and switch antenna's according to preset (memorized) // values. RX and TX antenna's can be different. // Press and hold TXsim button and select
More informationHPE Security Data Security. HPE SecureData. Product Lifecycle Status. End of Support Dates. Date: April 20, 2017 Version:
HPE Security Data Security HPE SecureData Product Lifecycle Status End of Support Dates Date: April 20, 2017 Version: 1704-1 Table of Contents Table of Contents... 2 Introduction... 3 HPE SecureData Appliance...
More informationFile: Unsaved Document 1 Page 1 of 7
File: Unsaved Document 1 Page 1 of 7 /* Example 10.2 On/off timer tronixstuff.com/tutorials > Chapter 10 based on code by Maurice Ribble 17-4-2008 - http://www.glacialwanderer.com/hobbyrobotics and John
More informationCIMA Certificate BA Interactive Timetable
CIMA Certificate BA Interactive Timetable 2018 Nottingham & Leicester Version 3.2 Information last updated 09/03/18 Please note: Information and dates in this timetable are subject to change. Introduction
More informationDesign with Microprocessors
Design with Microprocessors Year III Computer Science 1-st Semester Lecture 6: Serial data transfer Serial Interfaces on AVR Universal Synchronous and Asynchronous serial Receiver and Transmitter (USART)
More informationPCMSK2 = (1 << PCINT18) (1 << PCINT19);//Matrix "state machine" decode
EZall.ino /** * Rotary encoder tuned for Raduino * Third build. Experimental BITX * V 1.0.5 ND6T 16 May 2018 * Compiles under Etherkit Si5351 library v 2.0.6 * This source file is under General Public
More informationINFORMATION TECHNOLOGY SPREADSHEETS. Part 1
INFORMATION TECHNOLOGY SPREADSHEETS Part 1 Page: 1 Created by John Martin Exercise Built-In Lists 1. Start Excel Spreadsheet 2. In cell B1 enter Mon 3. In cell C1 enter Tue 4. Select cell C1 5. At the
More informationProject 1 System Calls
Project 1 System Calls Introduction In this project, you will become familiar with: 1. Using the xv6 Makefile 2. Using conditional compilation. 3. The xv6 system call invocation path. 4. Implementing a
More informationTANGIBLE MEDIA & PHYSICAL COMPUTING MORE ARDUINO
TANGIBLE MEDIA & PHYSICAL COMPUTING MORE ARDUINO AGENDA RECAP ALGORITHMIC APPROACHES TIMERS RECAP: LAST WEEK WE DID: ARDUINO IDE INTRO MAKE SURE BOARD AND USB PORT SELECTED UPLOAD PROCESS COVERED DATATYPES
More informationArduino 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 informationSILENCING AN ALARM. When the alarm bell or siren is sounding, enter your user code or present your keyfob to your keypad.
S Y S T E M U S E R G U I D E SILENCING AN ALARM When the alarm bell or siren is sounding, enter your user code or present your keyfob to your keypad. IS THIS A FALSE ALARM? YES NO displays. REAL ALARM
More informationMore 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 informationArduino 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