/* 11-2-2012 Spark Fun Electronics Nathan Seidle This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). Serial7Segment is an open source seven segment display. This is example code that shows how to send data over I2C to the display. Note: This code expects the display to be listening at the default I2C address. If your display is not at 0x71, you can do a software or hardware reset. See the Wiki for more info: http://github.com/sparkfun/Serial7SegmentDisplay/wiki/Special-Commands To get this code to work, attached an Serial7Segment to an Arduino Uno using the following pins: A5 to SCL A4 to SDA VIN to PWR GND to GND */ #include #define DISPLAY_ADDRESS1 0x71 //This is the default address of the OpenSegment with both solder jumpers open int cycles = 0; void setup() { Wire.begin(); //Join the bus as master //Send the reset command to the display - this forces the cursor to return to the beginning of the display Wire.beginTransmission(DISPLAY_ADDRESS1); Wire.write('v'); Wire.endTransmission(); } void loop() { // clearing Wire.beginTransmission(DISPLAY_ADDRESS1); Wire.write(0x76); Wire.endTransmission(); delay(1000); // simple send Wire.beginTransmission(DISPLAY_ADDRESS1); Wire.write(0x01); Wire.write('2'); Wire.write(0x0A); Wire.write('B'); Wire.endTransmission(); delay(1000); // moving cursor Wire.beginTransmission(DISPLAY_ADDRESS1); Wire.write(0x79); Wire.write(0x01); Wire.write('B'); Wire.endTransmission(); delay(1000); // decimal for (int i = 0; i < 8; i++) { Wire.beginTransmission(DISPLAY_ADDRESS1); Wire.write(0x77); Wire.write(0x01<