Java
Stumped for hours as to why I couldn't get processing to read my arduino's serial port I stumbled across a code sample in the processing docs that didn't use serialEvent. Then it worked fine! This code simply sets the background color to match the value being sent over the serial port from an Arduino that is sampling a LDR (light sensor).
The following is a port of the JavaScript example on http://pivot.apache.org/tutorials/hello-wtkx.html to Groovy.
Note : I could not get
def windowOpened(window){
to work, so that is why I use a closure instead.
Copyright © 2011, Aaron Blondeau
Drupal theme by Kiwi Themes.