stickyBUG Code

The following sample code requires the segmentBUG library.

Source Code


// import libraries...
#include <Wire.h>
#include "segmentBUG.h"

// 7 segment object...
segmentBUG segment = segmentBUG();

// program setup...
void setup() {
   segment.begin(SEGMENT_BUG_ADDRESS);
}

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

   // this is the simplest way to display a number...
   for (unsigned int index = 0; index < 9999; index++) {
      segment.println(index);
      segment.writeDisplay();
      delay(10);
   }
}