Real Time Data Plotting
|
|
- Janis George
- 5 years ago
- Views:
Transcription
1 Real Time Data Plotting
2 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. Send the sample once a second. The plotting program will read the data from the serial interface and plot it. This plotting program will plot the data in real time. It will display 400 samples along the X axis and then repeat over writing the previous samples.
3 The Plot The plot is going to be made in a rectangle. The top left corner of the rectangle will be positioned at 50,50 pixel location. The rectangle will be 400 by 400 pixels. X and Y labels will be added along with tick marks. Data will be plotted inside the rectangle.
4 First, two variables will be declared. Declaring them outside any function will make them global meaning they can be used in any function. Variable integer i will be an index variable. Variable data_plot will be an floating point array of 400 elements. int i; int[] data_plot = new int[400];
5 Next is the setup() function. The window is created with the size() function. All the elements in the data_plot array are initialized to zero. Variables always need to be initialized. Since the variable i was used, it has to be reset to zero. After the for() loop, the variable i has a value of 400. int i; float[] data_plot = new float[400]; void setup() size(500,500); for(i=0;i<400;i++) data_plot[i] = 0.0; i = 0;
6 Last item is to set the text size in the plot. This isn't required and can be changed depending on the desired look of the plot. int i; float[] data_plot = new float[400]; void setup() size(500,500); for(i=0;i<400;i++) data_plot[i] = 0.0; i = 0; textsize(14);
7 Two functions are created. The plot_data() function will generate the plot with the values in the data_plot variable array. The draw() function repeatedly calls the plot_data() function. Before it is called, the background() function is called. The background() function clears the screen so the plot can be redrawn with new data. If it is not called, the display will just have plots placed on top of plots. int i; float[] data_plot = new float[400]; void setup() size(500,500); for(i=0;i<400;i++) data_plot[i] = 0.0; i = 0; textsize(14); void draw() background(0); plot_data();
8 In the plot_data() function, the fill color is set to a dark gray which will set the color of the rectangle. The rect() function draws the rectangle starting at pixel 50,50 with a size of 400 by 400 pixels. Remember the starting position of the rectangle. The 50,50 coordinate will be the offset for drawing in the rectangle. int i; float[] data_plot = new float[400]; void setup() size(500,500); for(i=0;i<400;i++) data_plot[i] = 0.0; i = 0; textsize(14); void draw() background(0); plot_data();
9 The program can be run now. It will open a window and draw a rectangle on a black window that is dark grey. From now on, each step will add to the plot. The program can be run each time to see what was added. The setup() function and the draw() function will not be shown to save space. int i; float[] data_plot = new float[400]; void setup() size(500,500); for(i=0;i<400;i++) data_plot[i] = 0.0; i = 0; textsize(14); void draw() background(0); plot_data();
10 Import the Serial library. Create an instance of Serial called port. In the setup function, open the serial connection. Change the COM port number as needed. import processing.serial.*; Serial port; int i; float[] data_plot = new float[400]; void setup() port = new Serial(this, COM3,9600); size(500,500); for(i=0;i<400;i++) data_plot[i] = 0.0; i = 0; textsize(14); void draw() background(0); plot_data();
11 This section of code checks if the serial port had data in its buffer. If data is available, it is read into the String variable a. The String variable a is checked to make sure it is not empty. If it is not empty, the data is processed. First the variable a has the carriage return and linefeed characters removed. It is then converted to a floating point number and stored in the data_plot array at the element pointed to by i. i is incremented an checked to make sure it does not reach 400. When it does, it is reset to 0. //Previous code not shown for space void draw() background(0); if(port.available() > 0) String a = port.readstringuntil(10); if(a!= null) a = a.replaceall( (\\r \\n), ); data_plot[i] = float.parsefloat(a); i++; if(i == 400) i = 0; plot_data();
12 The two new functions inserted to modify how the rectangle is drawn. strokeweight() sets the line thickness. stroke() sets the color which is white. // only the plot function shown here strokeweight(4); stroke(255);
13 A label is added to the X axis. strokeweight(4); stroke(255); text( X Axis,250,480);
14 The next addition is adding the Y axis label. The label is rotated and moved into position. The translate() function moves the coordinate system. The rotate() function rotates the coordinate system. The text() function for the y Axis is then rendered. In order to not have everything else rotated and translated, the reverse rotation and translation is executed. strokeweight(4); stroke(255); line(50,250,400,250); text( X Axis,250,480); translate(20,250); rotate( PI/2); text("y axis",0,0); rotate(pi/2); translate( 20, 250);
15 Now, the data is plotted. First, the plot color is set to purple. The line thickness is set to 1. strokeweight(4); stroke(255); line(50,250,400,250); text( X Axis,250,480); translate(20,250); rotate( PI/2); text("y axis",0,0); rotate(pi/2); translate( 20, 250); stroke(200,0,200); strokeweight(1);
16 This section draws the data plot. First, the beginshape() function is called. This indicates the start of vector drawing. The parameter makes a line drawn between vector coordinates. The for() loop sequences through the data_plot array and creates a line to each coordinate specified in the vertex() function. When plotting the data is completed, the function endshape() is called. Setting Up the Plot strokeweight(4); stroke(255); line(50,250,400,250); text( X Axis,250,480); translate(20,250); rotate( PI/2); text("y axis",0,0); rotate(pi/2); translate( 20, 250); stroke(200,0,200); strokeweight(1); beginshape(lines); for(int b = 0;b < 400;b++) int y =map(data_plot[b],0,1023,400,0); vertex(b+50,y); endshape();
17 The map() function is used to scale the data to fit within the rectangle area that is being used as the plot. The height of the rectangle is 400 pixels. The data, if it is analog data has a range of 0 to The map function will scale the analog data to the range of 400 to 0. Notice the 400 is before 0. This inverts the data plot since the screen coordinates start at the top left corner. strokeweight(4); stroke(255); line(50,250,400,250); text( X Axis,250,480); translate(20,250); rotate( PI/2); text("y axis",0,0); rotate(pi/2); translate( 20, 250); stroke(200,0,200); strokeweight(1); beginshape(lines); for(int b = 0;b < 400;b++) int y =map(data_plot[b],0,1023,400,0); vertex(b+50,y+50); endshape();
18 Notice in the vertex() function that 50 is added to the x coordinate. This is because the rectangle at the 50 x coordinate. 50 is also added to the Y coordinate for the same reason. You have to take in into account the position of the rectangle. Run the program and have the arduino processor board send data from the analog port with a sensor connected. Use the serial.println() function to send the data. strokeweight(4); stroke(255); line(50,250,400,250); text( X Axis,250,480); translate(20,250); rotate( PI/2); text("y axis",0,0); rotate(pi/2); translate( 20, 250); stroke(200,0,200); strokeweight(1); beginshape(lines); for(int b = 0;b < 400;b++) int y =map(data_plot[b],0,1023,400,0); vertex(b+50,250 data_plot[b]); endshape();
19 Notice in the vertex() function that 50 is added to the x coordinate. This is because the rectangle at the 50 x coordinate. 50 is also added to the Y coordinate for the same reason. You have to take in into account the position of the rectangle. Run the program and have the arduino processor board send data from the analog port with a sensor connected. Use the serial.println() function to send the data. strokeweight(4); stroke(255); line(50,250,400,250); text( X Axis,250,480); translate(20,250); rotate( PI/2); text("y axis",0,0); rotate(pi/2); translate( 20, 250); stroke(200,0,200); strokeweight(1); beginshape(lines); for(int b = 0;b < 400;b++) int y =map(data_plot[b],0,1023,400,0); vertex(b+50,250 data_plot[b]); endshape();
20 It is time to add more features. The for() loop inserted adds tick marks along both axis on the plot. The tick marks are separated by 50 pixels and are 5 pixels long. The X axis tick marks are labelled with the text statement. strokeweight(4); stroke(255); line(50,250,400,250); text( X Axis,250,480); translate(20,250); rotate( PI/2); text("y axis",0,0); rotate(pi/2); translate( 20, 250); for(int x=0;x<400;x = x + 50) text(x,x+50,465); line(x+50,445,x+50,450); line(50,x+50,55,x+50); stroke(200,0,200); strokeweight(1); beginshape(lines); for(int b = 0;b < 400;b++) int y =map(data_plot[b],0,1023,400,0); vertex(b+51,data_plot[b] + 251); endshape();
21 This lesson showed the basics of creating a plot and filling it with data. Done More can be done with the plot. The tick marks can be labelled with values. The tick marks can be extended to create a grid. The window can be made larger and a second plot added to plot more data.
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 informationTransform 1: Translate, Matrices
Transform 1: Translate, Matrices This unit introduces coordinate system transformations and explains how to control their scope. Syntax introduced: translate(), pushmatrix(), popmatrix() The coordinate
More informationEXAMINATIONS 2016 TRIMESTER 2
EXAMINATIONS 2016 TRIMESTER 2 CGRA 151 INTRODUCTION TO COMPUTER GRAPHICS Time Allowed: TWO HOURS CLOSED BOOK Permitted materials: Silent non-programmable calculators or silent programmable calculators
More informationEXAMINATIONS 2017 TRIMESTER 2
EXAMINATIONS 2017 TRIMESTER 2 CGRA 151 INTRODUCTION TO COMPUTER GRAPHICS Time Allowed: TWO HOURS CLOSED BOOK Permitted materials: Silent non-programmable calculators or silent programmable calculators
More informationCS110 Introduction to Computing Fall 2016 Practice Exam 1 -- Solutions
CS110 Introduction to Computing Fall 2016 Practice Exam 1 -- Solutions The exam will be closed-note and closed-book; please consider this fact before using your notes on this practice version. Please see
More informationSolution Notes. COMP 151: Terms Test
Family Name:.............................. Other Names:............................. ID Number:............................... Signature.................................. Solution Notes COMP 151: Terms
More informationSten-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 informationReview Cellular Automata The Game of Life. 2D arrays, 3D arrays. Review Array Problems Challenge
Review Cellular Automata The Game of Life 2D arrays, 3D arrays Review Array Problems Challenge example1.pde Up until now All movement and sizing of graphical objects have been accomplished by modifying
More informationIteration in Programming
Iteration in Programming for loops Produced by: Mairead Meagher Dr. Siobhán Drohan Department of Computing and Mathematics http://www.wit.ie/ Topics list There are three types of loop in programming: While
More informationQuestion 1 (10 points) Write the correct answer in each of the following: a) Write a Processing command to create a canvas of 400x300 pixels:
Question 1 (10 points) Write the correct answer in each of the following: a) Write a Processing command to create a canvas of 400x300 pixels: size(400, 300); b) After the above command is carried out,
More informationEGG 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 informationTo specify the dimensions of the drawing canvas use the size statement: ! size( 300, 400 );
Study Guide We have examined three main topics: drawing static pictures, drawing simple moving pictures, and manipulating images. The Final Exam will be concerned with each of these three topics. Each
More informationSERIAL 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 informationEGG 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 informationWe will start our journey into Processing with creating static images using commands available in Processing:
Processing Notes Chapter 1: Starting Out We will start our journey into Processing with creating static images using commands available in Processing: rect( ) line ( ) ellipse() triangle() NOTE: to find
More informationGraphics. HCID 520 User Interface Software & Technology
Graphics HCID 520 User Interface Software & Technology PIXELS! 2D Graphics 2D Graphics in HTML 5 Raster Graphics: canvas element Low-level; modify a 2D grid of pixels.
More informationGraphics. HCID 520 User Interface Software & Technology
Graphics HCID 520 User Interface Software & Technology PIXELS! 2D Graphics 2D Raster Graphics Model Drawing canvas with own coordinate system. Origin at top-left, increasing down and right. Graphics
More informationProcessing Transformations. Affine Transformations
Processing Transformations Affine Transformations 1 A house size(200, 200); rect(50, 75, 100, 75); // (left, top, w, h) rect(100, 110, 20, 40); // door rect(70, 110, 15, 15); //window triangle(50, 75,
More informationArduino. 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 informationOld 257 Exam #2s for Practice
Old Exam #2s 257/757 Exploring Programming with Graphics Page 1 Old 257 Exam #2s for Practice Exams will be taken on Thursday March 27 in the cluster. You will have the entire class time to do the exam.
More informationmith College Computer Science CSC103 How Computers Work Week 7 Fall 2017 Dominique Thiébaut
mith College Computer Science CSC103 How Computers Work Week 7 Fall 2017 Dominique Thiébaut dthiebaut@smith.edu Important Review Does the animation leave a trace? Are the moving objects move without a
More informationCISC 1600 Lecture 3.1 Introduction to Processing
CISC 1600 Lecture 3.1 Introduction to Processing Topics: Example sketches Drawing functions in Processing Colors in Processing General Processing syntax Processing is for sketching Designed to allow artists
More informationDesign Programming DECO2011
Design Programming DECO2011 Rob Saunders web: http://www.arch.usyd.edu.au/~rob e-mail: rob@arch.usyd.edu.au office: Room 274, Wilkinson Building Data, Variables and Flow Control What is a Variable? Computers
More informationCSE120 Wi18 Final Review
CSE120 Wi18 Final Review Practice Question Solutions 1. True or false? Looping is necessary for complex programs. Briefly explain. False. Many loops can be explicitly written out as individual statements
More informationBuilding 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 informationInteraction 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 7 Conditionals in Processing Francesco Leotta, Andrea Marrella
More informationCISC 1600, Lab 3.1: Processing
CISC 1600, Lab 3.1: Processing Prof Michael Mandel 1 Getting set up For this lab, we will be using OpenProcessing, a site for building processing sketches online using processing.js. 1.1. Go to https://www.openprocessing.org/class/57767/
More informationUsing Methods. Methods that handle events. Mairead Meagher Dr. Siobhán Drohan. Produced by: Department of Computing and Mathematics
Using Methods Methods that handle events Produced by: Mairead Meagher Dr. Siobhán Drohan Department of Computing and Mathematics http://www.wit.ie/ Caveat The term function is used in Processing e.g. line(),
More informationCS110 Introduction to Computing Fall 2016 Practice Exam 1
CS110 Introduction to Computing Fall 2016 Practice Exam 1 The exam will be closed-note and closed-book; please consider this fact before using your notes on this practice version. Please see the abbreviated
More informationLecture 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 information2D Shapes. Creative Coding & Generative Art in Processing 2 Ira Greenberg, Dianna Xu, Deepak Kumar
2D Shapes Creative Coding & Generative Art in Processing 2 Ira Greenberg, Dianna Xu, Deepak Kumar Did you do this? Read Chapter 2 (pages 33-50) Read and do the Coordinate Systems & Shapes and Color tutorials
More informationCISC 1600, Lab 2.1: Processing
CISC 1600, Lab 2.1: Processing Prof Michael Mandel 1 Getting set up For this lab, we will be using Sketchpad, a site for building processing sketches online using processing.js. 1.1. Go to http://cisc1600.sketchpad.cc
More information+ Inheritance. Sometimes we need to create new more specialized types that are similar to types we have already created.
+ Inheritance + Inheritance Classes that we design in Java can be used to model some concept in our program. For example: Pokemon a = new Pokemon(); Pokemon b = new Pokemon() Sometimes we need to create
More informationUsing Methods. More on writing methods. Dr. Siobhán Drohan Mairead Meagher. Produced by: Department of Computing and Mathematics
Using Methods More on writing methods Produced by: Dr. Siobhán Drohan Mairead Meagher Department of Computing and Mathematics http://www.wit.ie/ Topics list Method example: Eyes Method example: X s Overloading
More informationGRAPHICS 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 informationimport processing.serial.*; //import the Serial library import controlp5.*; Serial myport; //the Serial port object
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
More informationThis Week Assignment 1 Arrays Time Casting Reading code Project 1
Computation as an Expressive Medium Lab 2: Kindergarten Cubbies, Back to the Future and Lego Mania Joshua Cuneo This Week Assignment 1 Arrays Time Casting Reading code Project 1 Assignment 1 A1-01: Draw
More informationCISC 1600, Lab 2.3: Processing animation, objects, and arrays
CISC 1600, Lab 2.3: Processing animation, objects, and arrays Prof Michael Mandel 1 Getting set up For this lab, we will again be using Sketchpad. sketchpad.cc in your browser and log in. Go to http://cisc1600.
More informationInteraction 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 8 Loops and Arrays in Processing Francesco Leotta, Andrea Marrella
More informationChapter 2 Surfer Tutorial
Chapter 2 Surfer Tutorial Overview This tutorial introduces you to some of Surfer s features and shows you the steps to take to produce maps. In addition, the tutorial will help previous Surfer users learn
More informationDEC HEX ACTION EXTRA DESCRIPTION
PHRAGSOFT 128 X 64 PIXEL LCD DISPLAY DRIVER The display driver uses the equivalent of standard BBC Microcomputer VDU codes, however, because the display is monochrome, with a fixed resolution, there are
More informationCISC 1600, Lab 2.2: Interactivity in Processing
CISC 1600, Lab 2.2: Interactivity in Processing Prof Michael Mandel 1 Getting set up For this lab, we will again be using Sketchpad, a site for building processing sketches online using processing.js.
More informationGraphics: Legacy Library
Graphics: Legacy Library Version 5.1 February 14, 2011 (require graphics/graphics) The viewport graphics library is a relatively simple toolbox of graphics commands. The library is not very powerful; it
More informationConnecting 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 informationBasic Computer Programming (Processing)
Contents 1. Basic Concepts (Page 2) 2. Processing (Page 2) 3. Statements and Comments (Page 6) 4. Variables (Page 7) 5. Setup and Draw (Page 8) 6. Data Types (Page 9) 7. Mouse Function (Page 10) 8. Keyboard
More informationComputer Graphics with OpenGL ES (J. Han) Chapter XI Normal Mapping
Chapter XI Normal Mapping Bumpy Surfaces Image texturing only Fast Not realistic Highly tessellated mesh Realistic Slow 11-2 Surface Normal and Lighting Recall the interaction among light sources, surfaces,
More informationIntroduction to Processing. Sally Kong
Introduction to Processing Sally Kong - Open Source Platform - Geared toward creating visual, interactive media - Created by Ben Fry and Casey Reas Basic Setup void setup() { size(800, 600); background(255);
More informationPROJECT 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 informationCS 105: Introduction to Computer Programming (using JavaScript) Quiz: Khan Academy: Intro to While Loop
CS 05: Introduction to Computer Programming (using JavaScript) Loops Instructor: Joel Castellanos e-mail: joel@unm.edu Web: http://cs.unm.edu/~joel/ Office: Farris Engineering Center 39 0/8/207 Quiz: Khan
More information1 Getting started with Processing
cisc3665, fall 2011, lab I.1 / prof sklar. 1 Getting started with Processing Processing is a sketch programming tool designed for use by non-technical people (e.g., artists, designers, musicians). For
More informationGuided Problem Solving
-1 Guided Problem Solving GPS Student Page 57, Exercises 1 1: Match each rule with the correct translation. A. (x, y) (x, y 1 ) I. P(, 1) P (3, ) B. (x, y) (x 1 3, y) II. Q(3, 0) Q (3, ) C. (x, y) (x 1,
More informationTopics for section today. Homework 10 functions for loops and loading fonts
Topics for section today Homework 10 functions for loops and loading fonts Assignment 10 Sudoku Board Draw the Sudoku board in Processing using for-loops and functions Assignment 10 Sudoku Board Draw the
More informationSFPL Reference Manual
1 SFPL Reference Manual By: Huang-Hsu Chen (hc2237) Xiao Song Lu(xl2144) Natasha Nezhdanova(nin2001) Ling Zhu(lz2153) 2 1. Lexical Conventions 1.1 Tokens There are six classes of tokes: identifiers, keywords,
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 informationGetting Started in Java CIS 110
Getting Started in Java CIS 110 2 Your First Program Program name 3 Your First Program The 4 li es aside fro the System.out li e are o sidered the Scaffolding of the program. Section 1.1 4 Your First Program
More informationCS12020 for CGVG. Practical 1. Jim Finnis
CS12020 for CGVG Practical 1 Jim Finnis (jcf1@aber.ac.uk) About me 20 years in the games industry (more or less) Windows, PS2, Xbox, Gamecube, Wii development experience DirectX (more than I like to think
More informationClass #1. introduction, functions, variables, conditionals
Class #1 introduction, functions, variables, conditionals what is processing hello world tour of the grounds functions,expressions, statements console/debugging drawing data types and variables decisions
More information[ the academy_of_code] Senior Beginners
[ the academy_of_code] Senior Beginners 1 Drawing Circles First step open Processing Open Processing by clicking on the Processing icon (that s the white P on the blue background your teacher will tell
More informationLoops. Variable Scope Remapping Nested Loops. Donald Judd. CS Loops 1. CS Loops 2
Loops Variable Scope Remapping Nested Loops CS105 05 Loops 1 Donald Judd CS105 05 Loops 2 judd while (expression) { statements CS105 05 Loops 3 Four Loop Questions 1. What do I want to repeat? - a rect
More informationCSC 120 Introduction to Creative Graphical Coding, Fall 2015
CSC 120 Introduction to Creative Graphical Coding, Fall 2015 Dr. Dale E. Parson, Outline in preparation for assignment 2. How to move your avatar in a function and give it X, Y, and scaling parameters.
More informationMirage. Language Reference Manual. Image drawn using Mirage 1.1. Columbia University COMS W4115 Programming Languages and Translators Fall 2006
Mirage Language Reference Manual Image drawn using Mirage 1.1 Columbia University COMS W4115 Programming Languages and Translators Fall 2006 Prof. Stephen Edwards Team Members: Abhilash I ai2160@columbia.edu
More informationCOPYRIGHTED MATERIAL. Elements of the Language. C h a p t e r
C h a p t e r 1 Elements of the Language Processing is a computer language originally conceived by Ben Fry and Casey Reas, students at the time (2001) at MIT. Their objective was to develop a simple language
More informationISL RGB Sensor Tutorial By: Sabrina Jones
ISL 25129 RGB Sensor Tutorial By: Sabrina Jones Overview The ISL29125 RGB sensor is a breakout board made to record the light intensity of the general red, green, and blue spectrums of visible light, that
More informationvoid set_target(unsigned char servo, unsigned int pozitie) { //merge la pozitia respectiva
a. Arduino #include Servo servo3; int servopin = 11; int senzor = 0; int val_senzor = 0; int LED = 8; int aux = 100; //librarie pentru servomotoare //declarare variabile void set_target(unsigned
More informationStenBOT Robot Kit. Stensat Group LLC, Copyright 2018
StenBOT Robot Kit 1 Stensat Group LLC, Copyright 2018 Legal Stuff Stensat Group LLC assumes no responsibility and/or liability for the use of the kit and documentation. There is a 90 day warranty for the
More information2IS45 Programming
Course Website Assignment Goals 2IS45 Programming http://www.win.tue.nl/~wsinswan/programmeren_2is45/ Rectangles Learn to use existing Abstract Data Types based on their contract (class Rectangle in Rectangle.
More informationCS 106 Winter 2016 Craig S. Kaplan. Module 08 Randomness and noise Topics
CS 106 Winter 2016 Craig S. Kaplan Module 08 Randomness and noise Topics The use of randomness as a design tool, controlling randomness in code Emergent design from simple rules Readings Learning Processing,
More informationChapter 8: Implementation- Clipping and Rasterization
Chapter 8: Implementation- Clipping and Rasterization Clipping Fundamentals Cohen-Sutherland Parametric Polygons Circles and Curves Text Basic Concepts: The purpose of clipping is to remove objects or
More informationPick 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 informationCreating Icons for Leopard Buttons
Creating Icons for Leopard Buttons Introduction Among the new features that C-Max 2.0 brings to the Ocelot and Leopard controllers, one of the more sophisticated ones allows the user to create icons that
More informationVariables 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 informationRecall that creating or declaring a variable can be done as follows:
Lesson 2: & Conditionals Recall that creating or declaring a variable can be done as follows:! float radius = 20;! int counter = 5;! string name = Mr. Nickel ;! boolean ispressed = true;! char grade =
More informationGIMP WEB 2.0 ICONS. GIMP is all about IT (Images and Text) OPEN GIMP
GIMP WEB 2.0 ICONS or WEB 2.0 ICONS: MEMO Web 2.0 Icons: Memo GIMP is all about IT (Images and Text) OPEN GIMP Step 1: To begin a new GIMP project, from the Menu Bar, select File New. At the Create a New
More information(a) Assume that in a certain country, tax is payable at the following rates:
3 1. (Total = 12 marks) (a) Assume that in a certain country, tax is payable at the following rates: 15% on your first $50000 income 25% on any amount over $50000 Write a method that takes in an annual
More informationPieNum Language Reference Manual
PieNum Language Reference Manual October 2017 Hadiah Venner (hkv2001) Hana Fusman (hbf2113) Ogochukwu Nwodoh( ocn2000) Index Introduction 1. Lexical Convention 1.1. Comments 1.2. Identifiers 1.3. Keywords
More informationCS1950U Setup Spring 2018
CS1950U Topics in 3D Game Engine Development Barbara Meier CS1950U Setup Spring 2018 Introduction Hi there! This guide is designed to help you get setup for taking CS1950U. It will go through the basics
More informationB Additional Recipes
B Additional Recipes Appendix B, Additional recipes, includes a select few recipes that take advantage of some of the features of AndEngine which are less likely to be included in the average development
More informationName CMPS 5J Final March 17, 2010 This is a closed notes, closed book exam. Each problem is worth 1 point unless indicated otherwise.
Name CMPS 5J Final March 17, 2010 This is a closed notes, closed book exam. Each problem is worth 1 point unless indicated otherwise. There are 21 problems and 25 points total. There are multiple versions
More informationThe NGT30 is an easy to use, 5v compatible propeller graphics device. It communicates simply with UART communication.
The NGT30 is an easy to use, 5v compatible propeller graphics device. It communicates simply with UART communication. It will help you make your project by featuring: An Arduino shield-compatible interface
More informationIn this lecture we will briefly examine a few new controls, introduce the concept of scope, random numbers, and drawing simple graphics.
Additional Controls, Scope, Random Numbers, and Graphics CS109 In this lecture we will briefly examine a few new controls, introduce the concept of scope, random numbers, and drawing simple graphics. Combo
More informationCISC 1600, Lab 3.2: Interactivity in Processing
CISC 1600, Lab 3.2: Interactivity in Processing Prof Michael Mandel 1 Getting set up For this lab, we will be using OpenProcessing, a site for building processing sketches online using processing.js. 1.1.
More informationProgramming: You will have 6 files all need to be located in the dir. named PA4:
PROGRAMMING ASSIGNMENT 4: Read Savitch: Chapter 7 and class notes Programming: You will have 6 files all need to be located in the dir. named PA4: PA4.java ShapeP4.java PointP4.java CircleP4.java RectangleP4.java
More informationBasic Input and Output
Basic Input and Output CSE 120 Winter 2019 Instructor: Teaching Assistants: Justin Hsia Ann Shan, Eunia Lee, Pei Lee Yap, Sam Wolfson, Travis McGaha Facebook to integrate WhatsApp, Instagram and Messenger
More informationL E S S O N 2 Background
Flight, Naperville Central High School, Naperville, Ill. No hard hat needed in the InDesign work area Once you learn the concepts of good page design, and you learn how to use InDesign, you are limited
More informationmith College Computer Science CSC103 How Computers Work Week 6 Fall 2017 Dominique Thiébaut
mith College Computer Science CSC103 How Computers Work Week 6 Fall 2017 Dominique Thiébaut dthiebaut@smith.edu Ben Fry on Processing... http://www.youtube.com/watch?&v=z-g-cwdnudu An Example Mouse 2D
More informationA B C D CS105 03a Interaction
Interaction Function Definition Events Built-in Variables CS105 03a Interaction 1 Which image is drawn by this code? strokeweight(10); stroke(0, 255, 0); // green line(99, 0, 0, 99); stroke(200, 0, 200);
More informationIntroduction to version Instruction date
Introduction to version 1.1.0 Instruction date 16.5.2008 Windows and Files Start by creating the window Open FCS data file By right-clicking the axis the list of available parameters appear. Right-click
More informationComputer Graphics. Making Pictures. Computer Graphics CSC470 1
Computer Graphics Making Pictures Computer Graphics CSC470 1 Getting Started Making Pictures Graphics display: Entire screen (a); windows system (b); [both have usual screen coordinates, with y-axis y
More informationCMPSCI 119 LAB #2 Greebles / Anime Eyes Professor William T. Verts
CMPSCI 119 LAB #2 Greebles / Anime Eyes Professor William T. Verts The goal of this Python programming assignment is to write your own code inside a provided program framework, with some new graphical
More informationThe Processing language. Arduino and Processing.
IAT267 Introduc/on to Technological Systems Lecture 8 The Processing language. Arduino and Processing. 1 Course Project All teams submibed very interes/ng proposals One requirement for the project is to
More informationCREATING DESMOS ETOOLS
CREATING DESMOS ETOOLS Table of Contents Using Desmos... 3 Creating & Using a Desmos Account (Top Black Bar)... 4 Domain/Range & Axis Labels & Zoom: (Right side Icons)... 6 Adding Items in the List Tray:
More informationDrawing Primitives. OpenGL basics
CSC 706 Computer Graphics / Dr. N. Gueorguieva 1 OpenGL Libraries Drawing Primitives OpenGL basics OpenGL core library OpenGL32 on Windows GL on most unix/linux systems (libgl.a) OpenGL Utility Library
More information1. Complete these exercises to practice creating user functions in small sketches.
Lab 6 Due: Fri, Nov 4, 9 AM Consult the Standard Lab Instructions on LEARN for explanations of Lab Days ( D1, D2, D3 ), the Processing Language and IDE, and Saving and Submitting. Rules: Do not use the
More information1 Getting started with Processing
cis3.5, spring 2009, lab II.1 / prof sklar. 1 Getting started with Processing Processing is a sketch programming tool designed for use by non-technical people (e.g., artists, designers, musicians). For
More informationMarionette nodes - Vol. 1
Marionette nodes - Vol. 1 1. 2D objects 1. Arc : Creates an arc object, or a polyline object. 2. GetRRDiam : Returns the horizontal and vertical diameters of the rounded corners of a rounded rectangle
More informationUniversity of Cincinnati. P5.JS: Getting Started. p5.js
p5.js P5.JS: Getting Started Matthew Wizinsky University of Cincinnati School of Design HTML + CSS + P5.js File Handling & Management Environment Canvas Coordinates Syntax Drawing Variables Mouse Position
More informationFunctions. Functions. nofill(); point(20, 30); float angle = map(i, 0, 10, -2, 2); parameters return values
Functions parameters return values 06 Functions 1 Functions Code that is packaged so it can be run by name Often has parameters to change how the function works (but not always) Often performs some computation
More informationProcessing & 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 informationFixed Perimeter Rectangles Geometry Creating a Document
Activity Overview: This activity provides the steps to create a TI-Nspire document that will be used to investigate side length and area in a rectangle with a fixed perimeter. An algebraic approach is
More informationGrove - Thumb Joystick
Grove - Thumb Joystick Introduction 3.3V 5.0V Analog Grove - Thumb Joystick is a Grove compatible module which is very similar to the analog joystick on PS2 (PlayStation 2) controllers. The X and Y axes
More information