Book Image

Processing 2: Creative Coding Hotshot

By : Nikolaus Gradwohl
Book Image

Processing 2: Creative Coding Hotshot

By: Nikolaus Gradwohl

Overview of this book

Processing makes it convenient for developers, artists, and designers to create their own projects easily and efficiently. Processing offers you a platform for expressing your ideas and engaging audiences in new ways. This book teaches you everything you need to know to explore new frontiers in animation and interactivity with the help of Processing."Processing 2: Creative Coding Hotshot' will present you with nine exciting projects that will take you beyond the basics and show you how you can make your programs see, hear, and even feel! With these projects, you will also learn how to build your own hardware controllers and integrate devices such as a Kinect senor board in your Processing sketches.Processing is an exciting programming environment for programmers and visual artists alike that makes it easier to create interactive programs.Through nine complete projects, "Processing 2: Creative Coding Hotshot' will help you explore the exciting possibilities that this open source language provides. The topics we will cover range from creating robot - actors performing Shakespeare's "Romeo and Juliet", to generating objects for 3D printing, and you will learn how to run your processing sketches nearly anywhere from a desktop computer to a browser or a mobile device.
Table of Contents (16 chapters)
Processing 2: Creative Coding Hotshot
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building your controller


In the first task of this mission, we learned how to connect a variable resistor to Arduino and send its value to the computer using the serial port. Our next task is to extend this basic circuit and add two more resistors, because we want to use them to control all the facial parameters of our Smilie-O-Mat sketch in the next task.

We will also add a button to our circuit and learn how to detect the click events and send them to our sketch. We will extend our communication protocol a bit and write a new Processing sketch that parses the messages—our Arduino generates—and displays the values we send.

Engage Thrusters

Let's build our controller:

  1. For this task, we need to expand our circuit and add two more variable resistors. So let's start by connecting the 5V pin to one of the outer power rails of the breadboard and the Gnd pin to the other one. Connect your three resistors to the breadboard as shown in the following diagram:

  2. Connect the left-outer lead of each resistor...