Hardware Reference
In-Depth Information
SUDOGLOVE PROCESSING DEBUGGER
TheSudoGloveisacontrolglovethatdrivesRCcarsandcontrolsother
hardware.IdevelopedaProcessingdebuggingdisplaythatgraphically
showsthevaluesofvarioussensors.Youcanlearnmoreaboutithere:
www.sudoglove.com .
DownloadthesourcecodefortheProcessingdisplayhere:
www.jeremyblum.com/2011/03/25/processing-based-sudoglove-
visual-debugger/ .YoucanalsoindthissourcecodeontheWiley
websiteshownatthebeginningofthischapter.
Sending Data from Processing to Your Arduino
The obvious next step is to do the opposite. Wire up an RGB LED to your
Arduino as shown in Figure 6-11 and load on the same program from earlier
that you used to receive a string of three comma-separated values for setting the
red, green, and blue intensities (Listing 6-5). Now, instead of sending a string
of three values from the serial monitor, you select a color using a color picker.
Load and run the code in Listing 6-8 in Processing, remembering to adjust the
serial port number accordingly as you did with the previous sketch. Processing
sketches automatically load collateral files from a folder called “data” in the
sketch folder. The hsv.jpg file is included in the code download for this chapter.
Download it and place it in a folder named “data” in the same directory as your
sketch. Processing defaults to saving sketches in your Documents folder. The
structure will look similar to the one shown in Figure 6-14.
Figure 6-14: Folder structure
The image in the data folder will serve as the color selector.
 
Search WWH ::




Custom Search