Physical Computing INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept.

Slides:



Advertisements
Similar presentations
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Advertisements

Creative Computing. \\ aims By the end of the session you will be able to: 1.Move objects around 2.Write simple interactive programs 3.Use the mouse position.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 3: Flow Control I: For Loops.
Introduction to Programming

Sl No Top-up Amount No Of Affiliate Ads Payment Per Day By Affiliate Ad Total Affiliate Ad Income 1.5,000/- Daily 2 ad for 100 days 100/- Affiliate.
Variables Conditionals Boolean Expressions Conditional Statements How a program produces different results based on varying circumstances if, else if,
Programming Methodology (1). public class Hello { public static void main(String[] args) { System.out.println("Hello world"); } } Hello world.
Copyright 2006 by Pearson Education 1 Building Java Programs Supplement 3G: Graphics.
Chapter 8: Arrays.
STRING AN EXAMPLE OF REFERENCE DATA TYPE. 2 Primitive Data Types  The eight Java primitive data types are:  byte  short  int  long  float  double.
IT 325 OPERATING SYSTEM C programming language. Why use C instead of Java Intermediate-level language:  Low-level features like bit operations  High-level.
Introduction to Programming G51PRG University of Nottingham Revision 1
Chapter 2: Using Objects Part 2. Assume you wish to test the behaviour of some method. This is accomplished by providing a tester class: Supply a main.
01. Consider the following code segment. int x = int n = 0; if (x < 500) { if (x > 750) n = 100; else n = 200; } else { if (x < 300) n = 300; else n =
Game with US Beginner Tutorial. Welcome!! Who I am What is Processing? Basic Coding Input Methods Images Classes Arrays.
A Quick Introduction to Processing
CS324e - Elements of Graphics and Visualization A Little Java A Little Python.
IAT 334 Java using Processing ______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY.
FUNDAMENTALS OF PROGRAMMING SM1204 Semester A 2011.
IAT 800 Foundations of Computational Art and Design Lecture 2.
IAT 800 Lab 1: Loops, Animation, and Simple User Interaction.
ICM Week 2. Structure - statements and blocks of code Any single statement ends with semicolon ; When we want to bunch a few statements together we use.
Lecture 3 IAT 800. Sept 15, Fall 2006IAT 8002 Suggestions on learning to program  Spend a lot of time fiddling around with code –Programming is something.
PROCESSING Animation. Objectives Be able to create Processing animations Be able to create interactive Processing programs.
FUNDAMENTALS OF PROGRAMMING SM1204 SEMESTER A 2012.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
Continuous February 16, Test Review What expression represents the zip car eligibility rules of at least 18 years old and no incidents?
Keyboard and Events. What about the keyboard? Keyboard inputs can be used in many ways---not just for text The boolean variable keyPressed is true if.
PAGES:51-59 SECTION: CONTROL1 : DECISIONS Decisions.
More arrays Primitive vs. reference parameters. Arrays as parameters to functions.
Review of ArT3 Programming Course David Meredith Aalborg University
______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] |
An Introduction to Java – Part 1 Dylan Boltz. What is Java?  An object-oriented programming language  Developed and released by Sun in 1995  Designed.
Introduction to Processing. 2 What is processing? A simple programming environment that was created to make it easier to develop visually oriented applications.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02b: Tutorial for Programming in Processing Jarek Rossignac.
CIS 3.5 Lecture 2.2 More programming with "Processing"
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
Variables Art &Technology, 3rd Semester Aalborg University Programming David Meredith
Arrays. An array is a collection “The Dinner offers an array of choices.” In computer programming, an array is a collection of variables of the same data.
Mouse Inputs in Processing. Interacting with the Mouse mouseX and mouseY: pg mouseXmouseY –The position of the mouse in the canvas pmouseX and.
Lesson Two: Everything You Need to Know
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 More details and explanation …
Test 2 Review. General Info. All tests are comprehensive. You are still responsible for the material covered prior to the first exam. You will be tested.
C Programming Lecture 16 Pointers. Pointers b A pointer is simply a variable that, like other variables, provides a name for a location (address) in memory.
LCC 6310 Computation as an Expressive Medium Lecture 2.
Words. Characters and Strings Character –A single character inside of single quotes char letter = 'A' ; char digit = '0' ; – Strings Zero or more character.
B. RAMAMURTHY Processing and Programming cse
Data Types Always data types will decide which type of information we are storing into variables In C programming language we are having 3 types of basic.
CSC 142 F 1 CSC 142 References and Primitives. CSC 142 F 2 Review: references and primitives  Reference: the name of an object. The type of the object.
Test Review. General Info. All tests will be comprehensive. You will be tested more on your understanding of code as opposed to your ability to write.
Welcome to Processing Who does not have access to digital camera?
Programming for Art: Arrays – 2D ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 16 Fall 2010.
A Introduction to Computing II Lecture 1: Java Review Fall Session 2000.
Review Random numbers mouseX, mouseY setup() & draw() frameRate(), loop(), noLoop() Mouse and Keyboard interaction Arcs, curves, bézier curves, custom.
1 Lecture # 2. * Introducing Programming with an Example * Identifiers, Variables, and Constants * Primitive Data Types * Byte, short, int, long, float,
Arrays. 2 Why do we care (about arrays)? What if you have a whole bunch of cars (or aliens or balls or ???) bouncing around the screen? How do we keep.
Object Oriented Programming Lecture 2: BallWorld.
Variables. Something to mention… void setup(){ size(200, 200); background(255); smooth(); } void draw() { stroke(0); strokeWeight(abs(mouseX-pmouseX));
CPSC 233 Tutorial January 21 st /22 nd, Linux Commands.
Computation as an Expressive Medium
Principles of Computer Programming (using Java) Chapter 2, Part 1
Computers & Programming Languages
An Introduction to Java – Part I, language basics
Mouse Inputs in Processing
More programming with "Processing"
Java Programming Review 1
LCC 6310 Computation as an Expressive Medium
IAT 800 Foundations of Computational Art and Design
LCC 6310 Computation as an Expressive Medium
Presentation transcript:

Physical Computing INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept.

Processing Tutorial 1 Getting Started INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. The Processing equivalent of a "Hello World" program is simply to draw a line: line(35, 25, 70, 90);

Processing Tutorial 1 Getting Started INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. Static programming command lines size(400, 400); background(192, 64, 0); stroke(255); line(150, 25, 270, 350);

Processing Tutorial 1 Getting Started INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. Interactive Programming, adding setup(), draw() and HELLO MOUSE void setup() { size(400, 400); stroke(255); background(192, 64, 0); } void draw() { line(150, 25, mouseX, mouseY); }

Processing Tutorial 1 Getting Started INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. Interactive Programming, adding setup(), draw() and HELLO MOUSE void setup() { size(400, 400); stroke(255); background(192, 64, 0); } void draw() { background(192, 64, 0); line(150, 25, mouseX, mouseY); }

Processing Tutorial 1 Getting Started INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. Interactive Programming, adding setup() and draw() and HELLO MOUSE void setup() { size(400, 400); stroke(255); background(192, 64, 0); } void draw() { line(150, 25, mouseX, mouseY); } void mousePressed() { background(192, 64, 0); }

Processing Tutorial 2 Variables tutorial2 Variable Declaration: int var; // type name Variable Initialization: var = 10; // var equals 10 Using Variable: var = var+1; INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. Data Primitive boolean byte char color double float int long Composite Array ArrayList HashMap Object String XMLElement

Processing Tutorial 3 for() void setup() { size(470, 200); println(Hello World); } void draw() { background(off); stroke(on); for (int i = 0; i <= 13; i++) { rect(420 - i * 30, 30, 20, 20); } INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept.

Processing Tutorial 3 Objects tutorial3. Human data * Height. * Weight. * Gender. * Eye color. * Hair color. Human functions * Sleep. * Wake up. * Eat. * Ride some form of transportation. INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept.

Processing Tutorial 4 Processing - Arduino Handshake Download Library Files From Download Processing Library: processing-arduino-0017.zip processing-arduino-0017.zip INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept.

Processing Tutorial 4 Processing - Arduino Handshake Instructions Unzip the library and copy the "arduino" folder into the "libraries" sub-folder of your Processing Sketchbook. (You can find the location of your Sketchbook by opening the Processing Preferences. If you haven't made a "libraries" sub-folder, create one.) Run Arduino, open the Examples > Firmata > StandardFirmata sketch, and upload it to the Arduino board. Configure Processing for serial: In Processing, open one of the examples that comes with with the Arduino library. Edit the example code to select the correct serial port. Run the example.Run the example. INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept.

Processing Tutorial 4 Processing - Arduino Handshake INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept.