// The simplest possible way to talk to a BlinkyTape import processing.serial.*; Serial s; void setup() { // Connect to the first serial port we can find // We assume there is a BlinkyTape there for(String p : Serial.list()) { // NOTE: you'll need to change the next line to match the serial port system, i.e. COMx on Windows if (p.startsWith("COM5")) { s = new Serial(this, p, 115200); } } } int nbrLeds=12; int ledsize=nbrLeds*3; byte[] leds = new byte[ledsize]; int ledidx=0; void draw() { int i; for(i=0; i=nbrLeds) { ledidx=0; } i=ledidx*3; leds[i]=40; leds[i+1]=40; leds[i+2]=40; for(i = 0; i < ledsize; i++) { s.write(leds[i]); } // Send a 0xFF byte to the strip, to tell it to display the pixels s.write((byte)255); println("Idx: ",ledidx); delay(10000); ledidx++; }