<< Summary

Seven segment LED, in Java Raspberry PI

The goal here is to use a seven Segment Display from a Java program running on a Raspberry PI.
For this example, we will be using a board like this one.

You will see that we can display more than just digits. Not all the characters are available, but you can pretty much render any text... Look at the code for details (in sevensegdisplay.SevenSegment.java, check out the map named ALL_CHARS).
The code contains several examples (in sevensegdisplay.samples) that you can run to see for yourself, with the provided scripts

Wiring

This one is again using I2C.

  Prompt> sudo i2cdetect -y 1
       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
  00:          -- -- -- -- -- -- -- -- -- -- -- -- --
  10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  70: 70 -- -- -- -- -- -- --
      
Detect the address as shown above.
This I2C address can be changed, see here.
The wiring is very simple:

Click to enlarge

Operation

This is what it looks like on the breadboard:

Click to enlarge
Digital clock.

Click to enlarge
Text display.

Click to enlarge
Text display.

Click to enlarge
Text display.

Click to enlarge
With a minus sign

Click to enlarge
With a minus sign, on the right


Oliv did it