こんなかんじ。Wiiバランスボードに乗ると、メジャーの画像がスライドして体重がわかります。
import lll.wrj4P5.*; import lll.Loc.*; PImage measure; Wrj4P5 wii; void setup () { size ( 300, 100 ); // The base class for managing the available WiiRemotes and extensions. this.wii = new Wrj4P5 ( this ); this.wii.connect (); measure = loadImage("measure.png"); } void draw () { if ( this.wii.isConnecting () ){ return;} float weight = this.wii.board.weight; println ( "weight: " + weight ); if(weight < 3){ weight = 0; } image(measure,-1*weight*10,0); noStroke(); fill(255,0,0); rect(width/2,0,5,50); }