stickyBUG Code

The following sample code requires the bargraphBUG library.

Source Code

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

 // bargraphBUG object
bargraphBUG bug = bargraphBUG();

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

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

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

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