Thursday, June 13, 2013

Raspberry Pi and 128x64 OLED

I recently purchased a LCD display for some projects I have going. Initially, I hooked it up to my arduino since Adafruit has libraries already written that can let you run things easily (just has to solder the header pins to the PCB and you are in business). Their library support is great and it makes things easy to use and they have some working examples too. Unfortunately (or fortunately!), if you plan to use this for a Raspberry Pi or Beaglebone Black, you are not so lucky as there are no libraries that you can download and use for those (yet!). Since I wanted to learn more about interfacing with hardware/firmware, this was a great place to start. The driver chip on the OLED board is a SSD1306 one and the datasheet is available here. I have mine connected to the PI via I2C. Note, by default, the OLED comes with SPI enabled, so closing 2 gates on the back with a little solder needs to be done to enable I2C. Just using a 2 jumper wires for clock and data, we are in business!

I was able to get some simple text up on the LCD and played around with placement (ie. centered and left justified). For me, it was easier to develop on ubuntu and copy my files over to the PI. It allowed me to do remote debugging and my core i7 was much faster than the processor on the PI. I still have a bit more functionality to add but so far it has been an enjoyable project to work on.

No comments :

Post a Comment