Skip to content
jimblom edited this page Nov 6, 2012 · 11 revisions

We've written loads of example sketches that explain how to interface an Arduino with a Serial 7-Segment Display. You can find them in the firmware/Serial 7-Segment Display/Arduino_Examples folder of this repo.

All of the Arduino sketches listed below are provided under the Beerware license. It's all public domain, free to use, modify, whatever. If you find it useful, and we meet some day, buy us a beer!

Serial Examples

The following example sketches show how you could use the Arduino's hardware or software UARTs to interface with the S7S:

For all example sketches, Arduino's software serial library is used. The display should be powered off 5V, and pin 7 of the communicating Arduino should be connected to the display's RX pin. !!! Fritzing pic needed

This is example code that shows how to display basic numbers on the display.

Aside from showing a number of methods for printing data, this sketch also provides a good example on how to use the clear display command.

This code expects the display to be listening at 9600bps. If your display is not at 9600bps, you can do a software or hardware reset. See the Wiki for more info.

This example code shows how to control the brightness and other system settings on S7S. This code alternates the display's brightness settings between 0%, 50%, and 100% brightness.

Note that the brightness setting is stored in EEPROM. So whenever the display loses power, the next time it's turned on it'll retain the brightness value last sent to it.

This is example code that shows how to display basic numbers and control the decimal, colon, and AM/PM dot.

This is a useful bit of code if you're looking to make a digital clock. As is seemingly standard with digital clocks, the colon should blink on and off to indicate passing seconds. The apostrophe dot in the upper right will indicate either AM or PM.

This example code shows how to control the baud rate and other settings on the S7S. Open the serial monitor at 9600bps to start the program.

Did you set your Serial7Segment display to a baud rate you don't know? This example sketch should get you fixed up! This example code sends the factory reset command at 12 different baud rates.

SPI Examples

I2C Examples


Datasheet Links:

  • Datasheet Homepage
  • [Hardware-Specifications](Hardware Specifications) - Electrical characteristics, voltage ratings, current usage, timing
  • [Interface-Specifications](Interface Specifications) - UART, SPI, and I2C explanations
  • Basic Usage - Displaying Numbers and Characters, Clearing, Cursor Control
  • Special Commands - Reset, Decimal, Cursor, Brightness, Baud, TWI address, and Individual segment control
  • [Customizing-the-Display](Customizing the Display) - Uploading a custom Arduino Sketch
Clone this wiki locally