July 22, 2010 1:10 AM
Processing
by Jenine Bressner
I've been figuring out how to use Processing. It's open- source, so you can download it for free and find tutorials on the Processing website.
I created the image above with one of the simple beginning codes, and the images below were created by modifiying that code.
A sort of storm
Undulating waves like unraveled knitting
Then I figured out how to code different colors.
I drew this with a mouse
May 12, 2010 1:08 PM
Levitating Elephant
by Noah BedfordI wrote a small clutter program to change the position of a picture of a Muybridge elephant based on the output of the step response board:
hello.elephant.py
This is the code that runs on the FTDI version of the step response board
![]()
March 31, 2010 9:07 AM
Using a GUI to Control Processing Output with ControlIP5, Firmata via Serial
by Anna Kaziunas Francebr> br> br>
I created this simple interface to control turning on and off an LED that is attached to a microcontroller via the serial port on my Mac. I wanted to see if I could get the ControlIP5 (used to create the GUI), Firmata and serial libraries working together before I tried using more complex hardware. I intend to experiment with driving multiple servos and possibly tinkering with bluetooth using the NXT library as an "cheap" way (it's "cheap" because I already own the Mindstorms hardware) to play around with bluetooth without buying additional bluetooth modules.
The interface is simple - the Turn On button turns the light on and the Turn Off button turns it off.


/*-------------------------------------------------------------------
* Fab Academy -- Module 09: Interface Programming
*--------------------------------------------------------------------
* Assignment: Write a user interface for an input &/or output
* device.
*--------------------------------------------------------------------
* Purpose: This program is a test to get the controlIP5, Firmata,
* and serial libraries working together through the serial port.
* This program uses a simple button GUI interface to turn on / of an
* LED.
*--------------------------------------------------------------------
* Anna Kaziunas France - 30 March 2010
* Combined / Modified example code from:
* controlIP5 buttons example (included the library download)
*------------------------------------------------------------------*/
import processing.serial.*;
import cc.arduino.*;
import controlP5.*;
ControlP5 controlP5;
// we have to use controlP5.Button here since there
// would be a conflict if we only use Button to declare button b.
controlP5.Button b;
Arduino arduino;
// Variables
int ledPin = 11;
int buttonValue = 0;
int myColor = color(0);
void setup() {
arduino = new Arduino(this, Arduino.list()[2], 57600);
arduino.pinMode(ledPin, Arduino.OUTPUT);
size(640,480);
smooth();
frameRate(30);
controlP5 = new ControlP5(this);
controlP5.addButton("Turn_On",255,200,80,100,70);
controlP5.addButton("Turn_Off",0,200,160,100,70);
println(Arduino.list());
}
void draw()
{
background(myColor);
fill(buttonValue);
rect(20,20,width-40,height-40);
}
public void controlEvent(ControlEvent theEvent) {
println(theEvent.controller().name());
}
// function buttonA will receive changes from
// controller with name Turn_On
public void Turn_On(int theValue) {
println("a button event from Turn_On: "+theValue);
myColor = theValue;
arduino.digitalWrite(ledPin, Arduino.HIGH);
}
// function buttonB will receive changes from
// controller with name Turn_Off
public void Turn_Off(int theValue) {
println("a button event from Turn_Off: "+theValue);
myColor = theValue;
arduino.digitalWrite(ledPin, Arduino.LOW);
}
March 30, 2010 12:45 AM
DIY hobo game controllers
by Shawn Wallace
These DIY game controllers are made from pennies and cigar boxes.
They are a sample controller for the Fluxly video game, a wizard duel where you have to build your own controller to compete. The interface for the game is implemented in Actionscript and compiled using Adobe's free mxmlc compiler.
Using a GUI to Control Processing Output with ControlIP5, Firmata via Serial
My favorite python/GTK reference