import processing.serial.*; //import the Serial library import controlp5.*; Serial myport; //the Serial port object

Size: px
Start display at page:

Download "import processing.serial.*; //import the Serial library import controlp5.*; Serial myport; //the Serial port object"

Transcription

1 import processing.serial.*; //import the Serial library import controlp5.*; Serial myport; //the Serial port object ControlP5 cp5; //the Control object CheckBox checkbox; Chart mychart; //Initialize Variables String inputtext = ""; String val; String[] thisiter; String[] datasent; boolean firstcontact = false; int module = 0; String steptimer = ""; String stepleft = ""; String tottimer = ""; int stepcount = 0; int preheat = 0; int potposition = 0; int HLTTemp = 0; int MashTemp = 0; int BoilTemp = 0; int ChillTemp = 0; int moduleselect = 0; int nsteps = 0; float[] temptarget = new float[4]; float[] curtemps = new float[4];

2 int[] steptemps = new int[10]; int chartcounter = 0; //Start Serial communication void setup() { size(700, 400); smooth(); myport = new Serial(this, "COM3", 9600); myport.bufferuntil(10); PFont font = createfont("arial", 12); cp5 = new ControlP5(this); cp5.addtextfield("input").setposition(10, 360).setSize(400, 20).setFont(font).setFocus(true).setColor(color(255, 0, 0)) ; cp5.addbang("clear").setposition(540, 360).setSize(80, 20).getCaptionLabel().align(ControlP5.CENTER, ControlP5.CENTER) ; cp5.addbang("send")

3 .setposition(440, 360).setSize(80, 20).getCaptionLabel().align(ControlP5.CENTER, ControlP5.CENTER) ; checkbox = cp5.addcheckbox("checkbox").setposition(10,310).setsize(20,20).setitemsperrow(2).setspacingcolumn(100).setspacingrow(20).additem("water Pump",4).addItem("Wort Pump",5) ; cp5.printpublicmethodsfor(chart.class); mychart = cp5.addchart("temperatures").setposition(300,50).setsize(350,250).setrange(40,220).setview(chart.line) ; mychart.getcolor().setbackground(color(255, 100)); mychart.setstrokeweight(4); mychart.adddataset("hlttemp"); mychart.setcolors("hlttemp",color(0,255,0), color(0, 255, 0)); mychart.setdata("hlttemp",new float[5000]); mychart.adddataset("mashtemp"); mychart.setcolors("mashtemp",color(255,255,0), color(255,255,0)); mychart.setdata("mashtemp",new float[5000]);

4 mychart.adddataset("boiltemp"); mychart.setcolors("boiltemp",color(255,0,255), color(255, 0, 255)); mychart.setdata("boiltemp",new float[5000]); mychart.adddataset("chilltemp"); mychart.setcolors("chilltemp",color(0,0,255), color(0, 0, 255)); mychart.setdata("chilltemp",new float[5000]); mychart.adddataset("temptarget"); mychart.setcolors("temptarget",color(255, 0, 0), color(255, 0, 0)); mychart.setdata("temptarget",new float[5000]); textfont(font); void serialevent(serial myport) { //put the incoming data into a String - //the '\n' is our end delimiter indicating the end of a complete packet val = myport.readstringuntil(10); //make sure our data isn't empty before continuing if (val!= null) { //trim whitespace and formatting characters (like carriage return) val = trim(val); println(val); //look for our 'A' string to start the handshake //if it's there, clear the buffer, and send a request for data if (firstcontact == false) { if (val.equals("a")) { myport.clear(); firstcontact = true; myport.write("a");

5 println("contact"); else { //if we've already established contact, keep getting and parsing data // Once contact is established, initialize the variables from the Serial stream if (val.equals("a")) { else { thisiter = split(val, ","); //printarray(thisiter); module = int(thisiter[0]); steptimer = thisiter[1]; stepleft = thisiter[2]; tottimer = thisiter[3]; stepcount = int(thisiter[4]); preheat = int(thisiter[5]); potposition = int(thisiter[6]); HLTTemp = int(thisiter[7]); curtemps[0]=float(hlttemp); MashTemp = int(thisiter[8]); curtemps[1] = float(mashtemp); BoilTemp = int(thisiter[9]); curtemps[2] = float(boiltemp); ChillTemp = int(thisiter[10]); curtemps[3] = float(chilltemp); if (moduleselect == 1){ temptarget[0] = float(steptemps[stepcount-1]); //HLT Temp temptarget[1] = temptarget[0] ; //Mash Temp else { println("somethings isnt working");

6 //Actually plot stuff to the GUI void draw() { background(0); fill(218,119,17); textsize(24); text("deathstar BREWING SYSTEM",150,30); textsize(12); text("status",10,50); text("timers",10,150); text("temperatures",10,220); fill(255); if (firstcontact == true){ text("arduino Connected:",10,65); text("on",130,65); else { text("arduino Connected:",10,65); text("off",130,65); text("module: ",10, 80); if (module == 1) text("mash",130,80); else if (module == 2) text("boil",130,80); else if (module == 3) text("chill",130,80); else if (module == 6) text("test",130,80); else text("error",130,80); text("step Number: ",10, 95); text(stepcount,130,95); text("preheated?",10,110); if (preheat == 0) text("no",130,110); else text("yes",130,110); text("element Duty Cycle: ",10, 125); text(potposition+"%",130,125); text("time in Step: ",10,165); text(steptimer,130,165);

7 text("time Left in Step: ",10,180); text(stepleft,130,180); text("total Time: ", 10, 195); text(tottimer,130,195); text("current",130,235); text("target",200,235); text("hlt Temp: degf",200,250); ", 10, 250); text(hlttemp+" degf",130,250);text(int(temptarget[0])+" text("mash Temp: ",10, 265); text(mashtemp+" degf",130,265); text(int(temptarget[1])+" degf",200,265); text("boil Temp: degf",200,280); ",10, 280); text(boiltemp+" degf",130,280);text(int(temptarget[2])+" text("chiller Temp: ",10, 295); text(chilltemp + " degf",130,295);text(int(temptarget[3])+" degf",200,295); text("modules = [1] Mash, [2] Boil, [3] Chill, [6] Test... KEYOPTS Differ By Module",10,350); if (chartcounter < 10) { mychart.push("hlttemp",curtemps[0]); mychart.push("mashtemp",curtemps[1]); mychart.push("boiltemp",curtemps[2]); mychart.push("chilltemp",curtemps[3]); if (module == 1) { mychart.push("temptarget",temptarget[0]); else if (module == 2) { mychart.push("temptarget",temptarget[2]); else if (module == 3) { mychart.push("temptarget",temptarget[3]); else { mychart.push("temptarget",0.0); chartcounter ++;

8 else{ chartcounter = 0; text(220, 275, 50); text(40,280,305); public void clear() { cp5.get(textfield.class, "input").clear(); // Use Q as a kill key and turn off everything void keypressed() { if (key == 'Q') { myport.write("9999"); println("9999"); temptarget[2] = 0; // After pressing Q, need to press R to reset check boxes in Processing since it doesn't happen automatically else if(key == 'R') checkbox.deactivateall(); // Send commands to the Arduino when the Send key is chosen public void send() { inputtext = cp5.get(textfield.class, "input").gettext(); println(inputtext); myport.write(inputtext); datasent = split(inputtext, ",");

9 //printarray(datasent); moduleselect = int(datasent[0]); if (moduleselect == 1) { nsteps = int(datasent[1]); for (int i=0;i<nsteps;i++){ steptemps[i] = int(datasent[i*2+3]); //println(steptemps[i]); temptarget[2] = 0; //Boil Temp temptarget[3] = 0; //Chiller Temp else if (moduleselect == 2) { temptarget[0] = 0; //HLT Temp temptarget[1] = 0; //Mash Temp temptarget[2] = 212; //Boil Temp temptarget[3] = 0; //Chiller Temp else if (moduleselect == 3) { temptarget[0] = 0; //HLT Temp temptarget[1] = 0; //Mash Temp temptarget[2] = 0; //Boil Temp temptarget[3] = float(datasent[1]); //Chiller Temp else { temptarget[0] = 0; //HLT Temp temptarget[1] = 0; //Mash Temp temptarget[2] = 0; //Boil Temp temptarget[3] = 0; //Chiller Temp

10 // Send stuff to Arduino based upon the checkbox values void controlevent(controlevent theevent) { if (theevent.isfrom(checkbox)) { int j = (int)checkbox.getarrayvalue()[0]; //Water Pump Status int k = (int)checkbox.getarrayvalue()[1]; //Wort Pump Status myport.write("4," + j + "," + k); println("4," + j + "," + k); delay(200);

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

Real Time Data Plotting

Real Time Data Plotting Real Time Data Plotting Introduction This lesson will show how to write a program plot data on a X-Y graph. On the Arduino, write a program to sample a sensor and print the voltage to the Serial interface.

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

SERIAL COMMUNICATION. _creates a data stream by sending one bit at a me _occurs sequen ally H...E...L...L...O

SERIAL COMMUNICATION. _creates a data stream by sending one bit at a me _occurs sequen ally H...E...L...L...O SERIAL COMMUNICATION Bits, Bytes, Data Rates and Protocols ASCI interpreta on Using terminal to view serial Data Serial Out from Arduino Serial In to Processing SERIAL COMMUNICATION _creates a data stream

More information

Lecture 7. Processing Development Environment (or PDE)

Lecture 7. Processing Development Environment (or PDE) Lecture 7 Processing Development Environment (or PDE) Processing Class Overview What is Processing? Installation and Intro. Serial Comm. from Arduino to Processing Drawing a dot & controlling position

More information

Introduction to Processing

Introduction to Processing Processing Introduction to Processing Processing is a programming environment that makes writing programs easier. It contains libraries and functions that make interacting with the program simple. The

More information

Arduino. AS220 Workshop. Part III Multimedia Applications Lutz Hamel

Arduino. AS220 Workshop. Part III Multimedia Applications Lutz Hamel AS220 Workshop Part III Multimedia Applications Lutz Hamel hamel@cs.uri.edu www.cs.uri.edu/~hamel/as220 Basic Building Blocks The basic building blocks for Arduino interactive object(s) are: Digital Input

More information

PROJECT FINAL: WEARABLE

PROJECT FINAL: WEARABLE PROJECT FINAL: WEARABLE David Snow Wearable Computing Jackson McConnell Dec/09/2014 DEVICE: iris Project iris is a device that gamifies the experience of your daily drive. This is a device for all those

More information

Interaction Design A.A. 2017/2018

Interaction Design A.A. 2017/2018 Corso di Laurea Magistrale in Design, Comunicazione Visiva e Multimediale - Sapienza Università di Roma Interaction Design A.A. 2017/2018 10 Advanced in Processing Francesco Leotta, Andrea Marrella Last

More information

Pick a number. Conditionals. Boolean Logic Relational Expressions Logical Operators Numerical Representation Binary. CS Conditionals 1

Pick a number. Conditionals. Boolean Logic Relational Expressions Logical Operators Numerical Representation Binary. CS Conditionals 1 Conditionals Boolean Logic Relational Expressions Logical Operators Numerical Representation Binary CS105 04 Conditionals 1 Pick a number CS105 04 Conditionals 2 Boolean Expressions An expression that

More information

Sensors and Motor Lab

Sensors and Motor Lab Sensors and Motor Lab Cole Gulino Team C / Column Robotics Teammates: Job Bedford, Erik Sjoberg, Rohan Thakker ILR # 1 October 16, 2015 Individual Progress For the Sensors and Motor Lab, I implemented

More information

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE LABORATORY 11: DIGITAL COMPASS DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF NEVADA, LAS VEGAS OVERVIEW This is a breakout board for Honeywell's

More information

18-heater Arduino code

18-heater Arduino code 18-heater Arduino code Modified from original code by Charith Fernanado: http://www.inmojo.com charith@inmojo.com #include // Creation of variables volatile int idimmer=0; volatile boolean

More information

Sending Binary Data from Processing to Arduino

Sending Binary Data from Processing to Arduino Sending Binary Data from Processing to Arduino I have been working on sending data (cues) from Processing ("Mother") to Arduino ("Izzy's brain"). Here is what I have so far. 1. 2. 3. 4. 5. 6. It loads

More information

Module 05 User Interfaces. CS 106 Winter 2018

Module 05 User Interfaces. CS 106 Winter 2018 Module 05 User Interfaces CS 106 Winter 2018 UI is a big topic GBDA 103: User Experience Design UI is a big topic GBDA 103: User Experience Design CS 349: User Interfaces CS 449: Human-Computer Interaction

More information

if / if else statements

if / if else statements if / if else statements December 1 2 3 4 5 Go over if notes and samples 8 9 10 11 12 Conditionals Quiz Conditionals TEST 15 16 17 18 19 1 7:30 8:21 2 8:27 9:18 3 9:24 10:14 1 CLASS 7:30 8:18 1 FINAL 8:24

More information

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE LABORATORY 10: DIGITAL COMPASS DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF NEVADA, LAS VEGAS OVERVIEW This is a breakout board for Honeywell's

More information

Miscellaneous Stuff That Might Be Important.

Miscellaneous Stuff That Might Be Important. 1 Miscellaneous Stuff That Might Be Important. Variable mousepressed VS function mousepressed( ) For much of the work in this class, it is usually safer to use the function form of mousepressed( ) instead

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

Variables One More (but not the last) Time with feeling

Variables One More (but not the last) Time with feeling 1 One More (but not the last) Time with feeling All variables have the following in common: a name a type ( int, float, ) a value an owner We can describe variables in terms of: who owns them ( Processing

More information

01/42. Lecture notes. Processing Basics

01/42. Lecture notes. Processing Basics 01/42 Type in Motion For typography to move, the program must run continuously, and therefore it requires a draw() function. Using typography within draw() requires three steps. First, a PFont variable

More information

Sten-SLATE ESP. WiFi

Sten-SLATE ESP. WiFi Sten-SLATE ESP WiFi Stensat Group LLC, Copyright 2016 1 References www.arduino.cc http://esp8266.github.io/arduino/versions/2.1.0/doc/reference.html 2 Introduction The wifi integrated in the processor

More information

Självständigt arbete på grundnivå

Självständigt arbete på grundnivå Självständigt arbete på grundnivå Independent degree project first cycle Elektroteknik 15 hp Electrical Engineering 15 credits Strontium-90 Radiation Detection Jingyi Jia i MID SWEDEN UNIVERSITY Department

More information

Module 01 Processing Recap

Module 01 Processing Recap Module 01 Processing Recap Processing is a language a library an environment Variables A variable is a named value. It has a type (which can t change) and a current value (which can change). Variables

More information

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find CS1622 Lecture 15 Semantic Analysis CS 1622 Lecture 15 1 Semantic Analysis How to build symbol tables How to use them to find multiply-declared and undeclared variables. How to perform type checking CS

More information

Arduino for ODROID-GO - Hello World

Arduino for ODROID-GO - Hello World 2018/12/16 09:56 1/6 Arduino for ODROID-GO - Hello World Arduino for ODROID-GO - Hello World Make sure that you've followed the Arduino setup guide. You will write code to display Hello, ODROID-GO on your

More information

VENTURE. Section 1. Lexical Elements. 1.1 Identifiers. 1.2 Keywords. 1.3 Literals

VENTURE. Section 1. Lexical Elements. 1.1 Identifiers. 1.2 Keywords. 1.3 Literals VENTURE COMS 4115 - Language Reference Manual Zach Adler (zpa2001), Ben Carlin (bc2620), Naina Sahrawat (ns3001), James Sands (js4597) Section 1. Lexical Elements 1.1 Identifiers An identifier in VENTURE

More information

chip1controller /* * SeniorDesignI2C.c * * Created: 11/24/2014 6:54:26 PM * Author: Robert Bower / Alonzo Ubilla * Chip 1 control */

chip1controller /* * SeniorDesignI2C.c * * Created: 11/24/2014 6:54:26 PM * Author: Robert Bower / Alonzo Ubilla * Chip 1 control */ /* * SeniorDesignI2C.c * * Created: 11/24/2014 6:54:26 PM * Author: Robert Bower / Alonzo Ubilla * Chip 1 control */ #include #include #include #include "TWI_slave.h"

More information

CSCI 136 Written Exam #2 Fundamentals of Computer Science II Spring 2015

CSCI 136 Written Exam #2 Fundamentals of Computer Science II Spring 2015 CSCI 136 Written Exam #2 Fundamentals of Computer Science II Spring 2015 Name: This exam consists of 6 problems on the following 6 pages. You may use your double- sided hand- written 8 ½ x 11 note sheet

More information

Sten-SLATE ESP. Graphical Interface

Sten-SLATE ESP. Graphical Interface Sten-SLATE ESP Graphical Interface Stensat Group LLC, Copyright 2016 1 References www.arduino.cc http://esp8266.github.io/arduino/versions/2.1.0/doc/reference.html 2 Graphical Interface In this section,

More information

CSE 143. Linked Lists. Linked Lists. Manipulating Nodes (1) Creating Nodes. Manipulating Nodes (3) Manipulating Nodes (2) CSE 143 1

CSE 143. Linked Lists. Linked Lists. Manipulating Nodes (1) Creating Nodes. Manipulating Nodes (3) Manipulating Nodes (2) CSE 143 1 CSE 143 Linked Lists [Chapter 4; Chapter 6, pp. 265-271] Linked Lists A linked list is a collection of dynamically allocated nodes Each node contains at least one member (field) that points to another

More information

Notes from the Boards Set BN19 Page

Notes from the Boards Set BN19 Page 1 The Class, String There are five programs in the class code folder Set17. The first one, String1 is discussed below. The folder StringInput shows simple string input from the keyboard. Processing is

More information

Review. Custom Objects. Comparing Declarations and Initializers Built PopGame. Classes Fields and Methods Instantiation using the "new" keyword

Review. Custom Objects. Comparing Declarations and Initializers Built PopGame. Classes Fields and Methods Instantiation using the new keyword Review Custom Objects Classes Fields and Methods Instantiation using the "new" keyword Comparing Declarations and Initializers Built PopGame Top-down Design Graphics Our Toolkit A Review lines, shapes,

More information

CSC Java Programming, Fall Java Data Types and Control Constructs

CSC Java Programming, Fall Java Data Types and Control Constructs CSC 243 - Java Programming, Fall 2016 Java Data Types and Control Constructs Java Types In general, a type is collection of possible values Main categories of Java types: Primitive/built-in Object/Reference

More information

#if ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #include "WConstants.h" #endif #include "Adafruit_Thermal.h"

#if ARDUINO >= 100 #include Arduino.h #else #include WProgram.h #include WConstants.h #endif #include Adafruit_Thermal.h /************************************************************************* This is an Arduino library for the Adafruit Thermal Printer. Pick one up at --> http://www.adafruit.com/products/597 These printers

More information

2. The object-oriented paradigm

2. The object-oriented paradigm 2. The object-oriented paradigm Plan for this section: Look at things we have to be able to do with a programming language Look at Java and how it is done there Note: I will make a lot of use of the fact

More information

CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 165] Postfix Expressions

CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 165] Postfix Expressions CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 165] Postfix Expressions We normally write arithmetic expressions using infix notation: the operator (such as +) goes in between the

More information

Basic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable

Basic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable Basic C++ Overview C++ is a version of the older C programming language. This is a language that is used for a wide variety of applications and which has a mature base of compilers and libraries. C++ is

More information

"sort A" "sort B" "sort C" time (seconds) # of elements

sort A sort B sort C time (seconds) # of elements Test 2: CPS 100 Owen Astrachan and Dee Ramm April 9, 1997 Name: Honor code acknowledgment (signature) Problem 1 value 15 pts. grade Problem 2 12 pts. Problem 3 17 pts. Problem 4 13 pts. Problem 5 12 pts.

More information

CS 110, Section 3 Exam 1 Review

CS 110, Section 3 Exam 1 Review CS 110, Section 3 Exam 1 Review What is printed when each program is executed? o Note, not all programs compile. Some have errors. Explain why the output is generated, or what caused the error. 1. int

More information

Micro-processor Controlled Potentiostat

Micro-processor Controlled Potentiostat Micro-processor Controlled Potentiostat -Full Report- By Chris Benton Prepared to partially fulfill the requirements of CSU ECE 402 Department of Electrical and Computer Engineering Colorado State University

More information

Parts List. XBEE/Wifi Adapter board 4 standoffs ¼ inch screws Cable XBEE module or Wifi module

Parts List. XBEE/Wifi Adapter board 4 standoffs ¼ inch screws Cable XBEE module or Wifi module Rover Wifi Module 1 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 Sten-Bot kit against component

More information

Java. Representing Data. Representing data. Primitive data types

Java. Representing Data. Representing data. Primitive data types Computer Science Representing Data Java 02/23/2010 CPSC 449 161 Unless otherwise noted, all artwork and illustrations by either Rob Kremer or Jörg Denzinger (course instructors) Representing data Manipulating

More information

CSCE 2014 Final Exam Spring Version A

CSCE 2014 Final Exam Spring Version A CSCE 2014 Final Exam Spring 2017 Version A Student Name: Student UAID: Instructions: This is a two-hour exam. Students are allowed one 8.5 by 11 page of study notes. Calculators, cell phones and computers

More information

Introduction to Arduino Programming 2017 Gordon Payne Newmarket High School Contents Page Introduction to Electronic Components 2 Arduino Activities 1. Build the Circuit-du-Jour 4 2. Control some LEDs

More information

Variables and Control Structures. CS 110 Eric Eaton

Variables and Control Structures. CS 110 Eric Eaton Variables and Control Structures CS 110 Eric Eaton Review Random numbers mousex, mousey setup() & draw() framerate(), loop(), noloop() Mouse and Keyboard interaccon Arcs, curves, bézier curves, custom

More information

TCL - STRINGS. Boolean value can be represented as 1, yes or true for true and 0, no, or false for false.

TCL - STRINGS. Boolean value can be represented as 1, yes or true for true and 0, no, or false for false. http://www.tutorialspoint.com/tcl-tk/tcl_strings.htm TCL - STRINGS Copyright tutorialspoint.com The primitive data-type of Tcl is string and often we can find quotes on Tcl as string only language. These

More information

Computational Expression

Computational Expression Computational Expression Variables, Primitive Data Types, Expressions Janyl Jumadinova 28-30 January, 2019 Janyl Jumadinova Computational Expression 28-30 January, 2019 1 / 17 Variables Variable is a name

More information

CMPT-166: Sample Final Exam Answer Key

CMPT-166: Sample Final Exam Answer Key CMPT 166, Summer 2012, Surrey Sample Final Exam Answer Key Page 1 of 9 CMPT-166: Sample Final Exam Answer Key Last name exactly as it appears on your student card First name exactly as it appears on your

More information

M/s. Managing distributed workloads. Language Reference Manual. Miranda Li (mjl2206) Benjamin Hanser (bwh2124) Mengdi Lin (ml3567)

M/s. Managing distributed workloads. Language Reference Manual. Miranda Li (mjl2206) Benjamin Hanser (bwh2124) Mengdi Lin (ml3567) 1 M/s Managing distributed workloads Language Reference Manual Miranda Li (mjl2206) Benjamin Hanser (bwh2124) Mengdi Lin (ml3567) Table of Contents 1. Introduction 2. Lexical elements 2.1 Comments 2.2

More information

Parts List. XBEE/Wifi Adapter board 4 standoffs ¼ inch screws Cable XBEE module or Wifi module

Parts List. XBEE/Wifi Adapter board 4 standoffs ¼ inch screws Cable XBEE module or Wifi module Rover Wifi Module 1 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 Sten-Bot kit against component

More information

Outline. 1 Scanning Tokens. 2 Regular Expresssions. 3 Finite State Automata

Outline. 1 Scanning Tokens. 2 Regular Expresssions. 3 Finite State Automata Outline 1 2 Regular Expresssions Lexical Analysis 3 Finite State Automata 4 Non-deterministic (NFA) Versus Deterministic Finite State Automata (DFA) 5 Regular Expresssions to NFA 6 NFA to DFA 7 8 JavaCC:

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

Do not turn to the next page until the start of the exam.

Do not turn to the next page until the start of the exam. Principles of Java Language with Applications, PIC20a E. Ryu Winter 2017 Final Exam Monday, March 20, 2017 3 hours, 8 questions, 100 points, 11 pages While we don t expect you will need more space than

More information

Write a program that creates in the main function two linked lists of characters and fills them with the following values:

Write a program that creates in the main function two linked lists of characters and fills them with the following values: Write a program that creates in the main function two linked lists of characters and fills them with the following values: The first list will have 3 nodes with the following characters: A,B, and C. The

More information

Lexical Analysis 1 / 52

Lexical Analysis 1 / 52 Lexical Analysis 1 / 52 Outline 1 Scanning Tokens 2 Regular Expresssions 3 Finite State Automata 4 Non-deterministic (NFA) Versus Deterministic Finite State Automata (DFA) 5 Regular Expresssions to NFA

More information

Birkbeck (University of London) Software and Programming 1 In-class Test Mar 2018

Birkbeck (University of London) Software and Programming 1 In-class Test Mar 2018 Birkbeck (University of London) Software and Programming 1 In-class Test 2.1 22 Mar 2018 Student Name Student Number Answer ALL Questions 1. What output is produced when the following Java program fragment

More information

CS 139 Practice Midterm Questions #2

CS 139 Practice Midterm Questions #2 CS 139 Practice Midterm Questions #2 Spring 2016 Name: 1. Write Java statements to accomplish each of the following. (a) Declares numbers to be an array of int s. (b) Initializes numbers to contain a reference

More information

Linked List Practice Questions

Linked List Practice Questions Linked List Practice Questions 1. The following function reverse() is supposed to reverse a singly linked list. There is one line missing at the end of the function. /* head_ref is a double pointer which

More information

CISC 1600 Lecture 2.2 Interactivity&animation in Processing

CISC 1600 Lecture 2.2 Interactivity&animation in Processing CISC 1600 Lecture 2.2 Interactivity&animation in Processing Topics: Interactivity: keyboard and mouse variables Interactivity: keyboard and mouse listeners Animation: vector graphics Animation: bitmap

More information

EP486 Microcontroller Applications

EP486 Microcontroller Applications EP486 Microcontroller Applications Topic 2 Processing Department of Engineering Physics University of Gaziantep Sep 2013 Sayfa 1 Processing is a programming language, development environment, and online

More information

CS 261: Data Structures. Dynamic Array Queue

CS 261: Data Structures. Dynamic Array Queue CS 261: Data Structures Dynamic Array Queue Dynamic Array -- Review Positives: Each element easily accessed Grows as needed The user unaware of memory management 2 Stack as Dynamic Array -- Review Remove

More information

Stacks have many uses Arithmetic Language parsing Keeping track of recursion (more in this in a week or so)

Stacks have many uses Arithmetic Language parsing Keeping track of recursion (more in this in a week or so) Implementing Stacks Basics of Exceptions OK, so stacks are useful Stacks have many uses Arithmetic Language parsing Keeping track of recursion (more in this in a week or so) How can stacks be implemented?

More information

Practice exam for CMSC131-04, Fall 2017

Practice exam for CMSC131-04, Fall 2017 Practice exam for CMSC131-04, Fall 2017 Q1 makepalindrome - Relevant topics: arrays, loops Write a method makepalidrome that takes an int array, return a new int array that contains the values from the

More information

Building a GUI From Scratch

Building a GUI From Scratch Building a GUI From Scratch 1 Processing Graphical User Interface In this lesson, you will learn how to create some simple GUI objects to control the robot. The GUI objects will be sliders and a joystick.

More information

AP CS Unit 4: Classes and Objects Programs

AP CS Unit 4: Classes and Objects Programs AP CS Unit 4: Classes and Objects Programs 1. Copy the Bucket class. Make sure it compiles (but you won t be able to run it because it does not have a main method). public class Bucket { private double

More information

Merging Physical and Virtual:

Merging Physical and Virtual: Merging Physical and Virtual: A Workshop about connecting Unity with Arduino v1.0 R. Yagiz Mungan yagiz@purdue.edu Purdue University - AD41700 Variable Topics in ETB: Computer Games Fall 2013 September

More information

Laboratory 5 Communication Interfaces

Laboratory 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 information

Name Section Number. CS210 Exam #3 *** PLEASE TURN OFF ALL CELL PHONES*** Practice

Name Section Number. CS210 Exam #3 *** PLEASE TURN OFF ALL CELL PHONES*** Practice Name Section Number CS210 Exam #3 *** PLEASE TURN OFF ALL CELL PHONES*** Practice All Sections Bob Wilson OPEN BOOK / OPEN NOTES: You will have all 90 minutes until the start of the next class period.

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

GRAPHICS PROGRAMMING. LAB #3 Starting a Simple Vector Animation

GRAPHICS PROGRAMMING. LAB #3 Starting a Simple Vector Animation GRAPHICS PROGRAMMING LAB #3 Starting a Simple Vector Animation Introduction: In previous classes we have talked about the difference between vector and bitmap images and vector and bitmap animations. In

More information

CS 251 Intermediate Programming Java I/O Streams

CS 251 Intermediate Programming Java I/O Streams CS 251 Intermediate Programming Java I/O Streams Brooke Chenoweth University of New Mexico Spring 2018 Basic Input/Output I/O Streams mostly in java.io package File I/O mostly in java.nio.file package

More information

Example Project Report March 5, Table Of Contents. This is an outline of the content of your model identifying each piece:

Example Project Report March 5, Table Of Contents. This is an outline of the content of your model identifying each piece: Example Project Report March 5, 2014 Table Of Contents The Telegram Problem Description... 2 Class Diagrams... 3 Class Detail... 4 Class Blank... 4 Class Buffer... 4 Association Note... 4 Class... 5 Class

More information

Today in CS161. Week #3. Learn about. Writing our First Program. See example demo programs. Data types (char, int, float) Input and Output (cin, cout)

Today in CS161. Week #3. Learn about. Writing our First Program. See example demo programs. Data types (char, int, float) Input and Output (cin, cout) Today in CS161 Week #3 Learn about Data types (char, int, float) Input and Output (cin, cout) Writing our First Program Write the Inches to MM Program See example demo programs CS161 Week #3 1 Data Types

More information

Program Elements -- Introduction

Program Elements -- Introduction Program Elements -- Introduction We can now examine the core elements of programming Chapter 3 focuses on: data types variable declaration and use operators and expressions decisions and loops input and

More information

firebase-arduino Documentation

firebase-arduino Documentation firebase-arduino Documentation Release 1.0 firebase-arduino Nov 17, 2017 Contents i ii FirebaseArduino is a library to simplify connecting to the Firebase database from arduino clients. It is a full abstraction

More information

EESy Solutions Engineering Equation Solver Newsletter

EESy Solutions Engineering Equation Solver Newsletter EESy Solutions Engineering Equation Solver Newsletter Inside this issue: Welcome 1 Arduino to EES Communication 1 The Arduino Sketch 2 The EES Macro 3 The CASE Statement 4 Tabs for Multiple Macros 5 Improved

More information

4Serial SIK BINDER //77

4Serial SIK BINDER //77 4Serial SIK BINDER //77 SIK BINDER //78 Serial Communication Serial is used to communicate between your computer and the RedBoard as well as between RedBoard boards and other devices. Serial uses a serial

More information

Watch the following for more announcements

Watch the following for more announcements Review "plain text file" loadstrings() split() splittokens() selectinput() println(), float(), int(), can take an array argument, will return an array easy way to convert an array of Strings to an array

More information

Chapter 4 Introduction to Control Statements

Chapter 4 Introduction to Control Statements Introduction to Control Statements Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives 2 How do you use the increment and decrement operators? What are the standard math methods?

More information

Oct Decision Structures cont d

Oct Decision Structures cont d Oct. 29 - Decision Structures cont d Programming Style and the if Statement Even though an if statement usually spans more than one line, it is really one statement. For instance, the following if statements

More information

Processing & Arduino in Tandem. Creating Your Own Digital Art Tools

Processing & Arduino in Tandem. Creating Your Own Digital Art Tools Processing & Arduino in Tandem Creating Your Own Digital Art Tools Week 2 - Making your own drawing tool Using Processing to build a basic application Segment 1 - A Basic Drawing Program Change window

More information

Documentation of the UJAC print module's XML tag set.

Documentation of the UJAC print module's XML tag set. Documentation of the UJAC print module's XML tag set. tag Changes the document font by adding the 'bold' attribute to the current font. tag Prints a barcode. type: The barcode type, supported

More information

CISC 1600 Lecture 2.2 Interactivity&animation in Processing

CISC 1600 Lecture 2.2 Interactivity&animation in Processing CISC 1600 Lecture 2.2 Interactivity&animation in Processing Topics: Interactivity: keyboard and mouse variables Interactivity: keyboard and mouse listeners Animation: vector graphics Animation: bitmap

More information

Module 01 Processing Recap. CS 106 Winter 2018

Module 01 Processing Recap. CS 106 Winter 2018 Module 01 Processing Recap CS 106 Winter 2018 Processing is a language a library an environment Variables A variable is a named value. It has a type (which can t change) and a current value (which can

More information

See Types of Data Supported for information about the types of files that you can import into Datameer.

See Types of Data Supported for information about the types of files that you can import into Datameer. Importing Data When you import data, you import it into a connection which is a collection of data from different sources such as various types of files and databases. See Configuring a Connection to learn

More information

Honu. Version November 6, 2010

Honu. Version November 6, 2010 Honu Version 5.0.2 November 6, 2010 Honu is a family of languages built on top of Racket. Honu syntax resembles Java. Like Racket, however, Honu has no fixed syntax, because Honu supports extensibility

More information

Typescript on LLVM Language Reference Manual

Typescript on LLVM Language Reference Manual Typescript on LLVM Language Reference Manual Ratheet Pandya UNI: rp2707 COMS 4115 H01 (CVN) 1. Introduction 2. Lexical Conventions 2.1 Tokens 2.2 Comments 2.3 Identifiers 2.4 Reserved Keywords 2.5 String

More information

Creating a Graphical LED cluster bean IBM Visual Age for Java - Creating Custom Beans

Creating a Graphical LED cluster bean IBM Visual Age for Java - Creating Custom Beans This tutorial will show you how create a visual Java Bean that represents an integer value as a row of 16 LED s Just follow each step in turn... Go to the Workbench Page 1 Add a Project using the menu

More information

Lecture 6. Assignments. Java Scanner. User Input 1/29/18. Reading: 2.12, 2.13, 3.1, 3.2, 3.3, 3.4

Lecture 6. Assignments. Java Scanner. User Input 1/29/18. Reading: 2.12, 2.13, 3.1, 3.2, 3.3, 3.4 Assignments Reading: 2.12, 2.13, 3.1, 3.2, 3.3, 3.4 Lecture 6 Complete for Lab 4, Project 1 Note: Slides 12 19 are summary slides for Chapter 2. They overview much of what we covered but are not complete.

More information

Parsing Instrument Data in Visual Basic

Parsing Instrument Data in Visual Basic Application Note 148 Parsing Instrument Data in Visual Basic Introduction Patrick Williams Instruments are notorious for sending back cryptic binary messages or strings containing a combination of header

More information

CS 455 Midterm Exam 1 Spring 2011 [Bono] Feb. 17, 2011

CS 455 Midterm Exam 1 Spring 2011 [Bono] Feb. 17, 2011 Name: USC loginid (e.g., ttrojan): CS 455 Midterm Exam 1 Spring 2011 [Bono] Feb. 17, 2011 There are 4 problems on the exam, with 50 points total available. There are 7 pages to the exam, including this

More information

SQream Connector Native C SQream Technologies Version 1.2.0

SQream Connector Native C SQream Technologies Version 1.2.0 SQream Connector Native C++ 1.2.0 SQream Technologies 2019-03-27 Version 1.2.0 Table of Contents The SQream Native C++ Connector - Overview................................................. 1 1. API Reference............................................................................

More information

Lecture 6. Assignments. Summary - Variables. Summary Program Parts 1/29/18. Reading: 3.1, 3.2, 3.3, 3.4

Lecture 6. Assignments. Summary - Variables. Summary Program Parts 1/29/18. Reading: 3.1, 3.2, 3.3, 3.4 Assignments Lecture 6 Complete for Project 1 Reading: 3.1, 3.2, 3.3, 3.4 Summary Program Parts Summary - Variables Class Header (class name matches the file name prefix) Class Body Because this is a program,

More information

CSCI 135 Programming Exam #1 Fundamentals of Computer Science I Fall 2014

CSCI 135 Programming Exam #1 Fundamentals of Computer Science I Fall 2014 CSCI 135 Programming Exam #1 Fundamentals of Computer Science I Fall 2014 This part of the exam is like a mini- programming assignment. You will create a program, compile it, and debug it as necessary.

More information

Internet Technology 2/7/2013

Internet Technology 2/7/2013 Sample Client-Server Program Internet Technology 02r. Programming with Sockets Paul Krzyzanowski Rutgers University Spring 2013 To illustrate programming with TCP/IP sockets, we ll write a small client-server

More information

Fall 2017 CISC124 10/1/2017

Fall 2017 CISC124 10/1/2017 CISC124 Today First onq quiz this week write in lab. More details in last Wednesday s lecture. Repeated: The quiz availability times will change to match each lab as the week progresses. Useful Java classes:

More information

GBL Language Reference Manual

GBL Language Reference Manual COMS W4115 PROGRAMMING LANGUAGES AND TRANSLATORS GBL Language Reference Manual Yiqing Cui(yc3121) Sihao Zhang(sz2558) Ye Cao(yc3113) Shengtong Zhang(sz2539) March 7, 2016 CONTENTS 1 Introduction 3 2 Syntax

More information

Searching and Sorting

Searching and Sorting CS 211 SEARCH & SORT SEARCHING & SORTING Searching and Sorting Searching means that we have some collection of data, and we seek a particular value that might be contained within our collection. We provide

More information

Exploring Processing

Exploring Processing Exploring Processing What is Processing? Easy-to-use programming environment Let s you edit, run, save, share all in one application Designed to support interactive, visual applications Something we ve

More information