Raspberry Pi Zero size HAT, with just enough.
Our first flavor. Originally designed by Josh (a VxGeek) for his custom motorcycle to measure acceleration and lean angles.
The M01033 is a 1.04" 128x32 pixel full graphic white PMOLED with a simple SPI interface. It's easy to setup and ideal for displaying text information, animations, and icons.
The BMX055 is a 9-axis IMU consisting an accelerometer, a gyroscope, and a magnetometer. If the Pi moves, you will know!
Questions, comments - good and bad. We'd love to hear from you.
Using Rocky Road with Python and Luma OLED
The Luma OLED package provides a simple yet powerful Python driver that works very well with the M01033 OLED on the Rocky Road.
We added some small changes to the sh1106 driver to add support for a 128x32 display, which are now incorporated into the PyPi repository.
1. Connect your Pi (all versions should work) to the internet so that you can use apt-get and pip easily. This can be somewhat challenging with a Pi Zero but the USB-ethernet gadget driver works well enough. There is a fine howto provided by Lady Ada at Adafruit to handle the Pi Zero setup: https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadget
2. Verify connectivity then execute the excellent install instructions provided by the Luma developers:
a. Initial setup to have root-level access to the serial busses (we use SPI to paint the display) and GPIO:
b. Library installation to get the latest version of Luma:
c. Once you have the libraries installed, clone the examples to try out a few of the demos:
d. You should now have a directory named luma.examples. From the examples directory, try a few of the Python scripts like this:
./3d_box -i spi -d sh1106 --height 32 --rotate 2
Use the “-i spi” to tell luma.oled that we’re using the first SPI bus, “-d sh1106” to use the proper driver code, and “--height 32” because we have a 128x32 display.
Depending on how you are holding the Rocky Road board, you may want the “rotate” option to flip the display.
Hopefully this quick guide shows how simple it actually is to get running with a small OLED. Stay tuned for the continuation where we start pulling data from the Bosch IMU via Python and the WiringPi-Python module:
Let us know how it goes for you and most importantly, share your projects! We’re excited to see what others can do with our Rocky Road!