I've also written supporting libraries to display both text and PNG files, although don't expect too much from a 128x32 monochrome image!
I've uploaded my notes and libraries here:
https://github.com/TJC/BeagleBone
Coding it is as simple as:
my $lcd = BeagleBone::SSD1306::Text->new( rst_pin => 'P9_15', dc_pin => 'P9_16', # remainder of pins must be connected to SPI pins ); $lcd->display_string("Hello world!");
This is great! Your whole github repo looking like a great start to a bonescript alternative!
ReplyDeleteI hope you don't mind if I re post your blog =)
ReplyDeleteSure, go ahead! :)
ReplyDeleteIt's not quite there yet -- I haven't imported the whole range of pin-to-gpio ranges yet, and there's no ADC or PWM support yet at all..
But I'll get to those soon enough, and the digital GPIO is working nicely already.
Have you gotten to the ADC, etc., yet? I'd be interested, for the BeagleBone Black.
DeleteUnfortunately my code was all targetted at the original Beaglebone, and thus the earlier Linux kernels with much simpler pin muxing. So it doesn't work at all on the Black or later revisions.
Deleteawesome! is there plans for c/c++ and I2C support? i just got a beaglebone black and wanted to learn about I2C.
ReplyDeleteI haven't done much with i2c myself, sorry.
ReplyDeleteI've written some support for the SSD1306 in C for a project, but I didn't build it into a library to be released. I'm sure there's already some stuff out there for C/C++ though, since that's the language used by Arduinos.
It's worth noting that my perl library above was targetted for the original beaglebone pin-muxing, which doesn't work on the 3.8.x kernels used by the beaglebone black.