// 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; int loop=0; int bytes=0; void draw() { int i; for(i=0; i=nbrLeds) { ledidx=0; } i=ledidx*3; leds[i]=0; leds[i+1]=0x40; leds[i+2]=0; 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); bytes+=ledsize; loop++; ledidx++; println("Idx: ",ledidx," Loop: ",loop," Bytes: ",bytes," LEDs: ",bytes/3); s.write((byte)0); s.write((byte)0); s.write((byte)0x40); s.write((byte)255); delay(10000); }