I bought one of these :
Which consist of 6 8*8 matrix displays. There are a few demo programs in various languages, but I want to drive it from Ruby, so a bit of setup is in place, including the necessary i2c drivers, as the daughter board sits on the i2c-bus.
Installing Ruby : https://coderwall.com/p/rmsi2w
i2c installation : https://coderwall.com/p/rmsi2w
pi@raspberrypi:~$ 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 71 72 — — — — —
So in other words it sits on i2c bus 1 – and the data addresses are 70, 71 and 72.
The to setting it up to see if it works from the command line :
pi@raspberrypi:~$ sudo i2cset -y 1 0x70 0x21pi@raspberrypi:~$ sudo i2cset -y 1 0x70 0x81pi@raspberrypi:~$ sudo i2cset -y 1 0x70 0xe0
The first turns on the oscillator – setting bit S in the “system setup” register – labelled D8 in the data sheet.
The next enables the display with no blinking – setting bit D in the “display setup register” – D8 again in the data sheet. To enable blinking then B1+B0 must be set to 01, 10 or 11 – i.e. replace 0×81 with 0×83, 0×85 or 0×87 respectively.
The last command sets the brightness level – in this case, leaving the brightness to the dimmest setting, P0, P1, P2, P3 are all zero in the “digital dimming data input”. Use a different value instead of 0 in the 0xe0 value – e.g. 0xef would be the brightest setting (all 1s).
And it Looks like something is displayed!
It looks like address block 70 is for 8*16 (the rightmost row of 2 displays. and 71 and 72 the next 2 rows.
The I download the driver from : https://github.com/meinside/raspi-adafruit-ruby.
The test runs – but only for one of the 8*8 displays. But it’s a good start.