1 / 12

Physical Computing

Physical Computing. INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. Processing Tutorial 1 “Getting Started”. The Processing equivalent of a "Hello World" program is simply to draw a line:.

arlen
Télécharger la présentation

Physical Computing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

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

  4. INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. Processing Tutorial 1“Getting Started” 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); }

  5. INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. Processing Tutorial 1“Getting Started” 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); }

  6. INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. Processing Tutorial 1“Getting Started” 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); }

  7. tutorial2 Processing Tutorial 2Variables Data Primitive boolean byte char color double float int long Composite Array ArrayList HashMap Object String XMLElement 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.

  8. Processing Tutorial 3for() 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.

  9. tutorial3. Processing Tutorial 3Objects 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.

  10. INST. Kerem Odabaşı - YTU - Interactive Telecomunication Design Dept. Processing Tutorial 4“Processing - Arduino Handshake” Download Library Files From www.arduino.cc http://www.arduino.cc/playground/Interfacing/Processing DownloadProcessing Library: processing-arduino-0017.zip

  11. 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: http://processing.org/reference/libraries/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.

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

More Related