Chapter 14
Processing the Physical World
IN THIS CHAPTER
Turning on a real light with a virtual switch
Graphing data from the physical world
Sending signals between the Arduino and Processing
In the preceding chapter, you learn the basics of Processing and its similarities to and differences from Arduino. This chapter is all about combining both tools to integrate the virtual and physical worlds. These few exercises teach you the basics about sending and receiving data in both Processing and Arduino. You can build on this knowledge to create your own projects, maybe to generate some awesome onscreen visuals from your sensors or to turn on a light every time someone mentions you on Twitter.
Making a Virtual Button
In this example, you learn how to make an onscreen button in Processing that affects a physical LED on your Arduino. This is a great sketch to get started with interactions between computers and the real world, and between an Arduino and Processing.
You need the following:
- An Arduino Uno
- An LED
The setup is simple for this introduction to Arduino and Processing, requiring only a single LED.
As shown in Figures 14-1 and 14-2, insert the long leg of the LED into pin ...
Get Arduino For Dummies, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.