stickyBUG Code

The following sample code requires the ledBUG library.

Source Code

// import libraries...
#include <Wire.h>
#include <ledBUG.h>

 // ledBUG object
ledBUG bug = ledBUG();

// program setup...
void setup() {
   bug.begin(LED_BUG_ADDRESS);
}

// main program loop...
void loop() {

   // turn all Leds on, full brightness...
   for(byte i = 0; i < 16; i++) {  
      bug.setValue(i, 255);
   } 
   delay(500);

   // now turn them off...
   for(byte i = 0; i < 16; i++) {  
      bug.setValue(i, 0);
   } 
   delay(500);
}