Hi, I plan to use a small 1.5 inch RGB OLED screen connected to an Raspberry PI 5 for implementing a simple text-based user interface. Displaying graphics or a full-blown GUI is for later, at this stage it can be considered nice-to-have.
The RPI is running Bookworm and the display is a Waveshare 1.5inch RGB OLED module that uses a SH1107SSD1351 driver and a four-wire SPI interface.
Currently I see the following options for writing to the screen from Rust:
I'm not awfully familiar with the RP ecosystem of embedded systems, however, you'd actually need to utilise libraries from both of your points!
rppal provides access to the Pi's interface, including the SPI interface, which implements the embedded_hal traits, which would allow you to use the embedded_graphics library which, from what I understand, would let you use the oled_async library to control it.
With the oled_async driver, it looks like I need to have a Raspberry PI "board" from the embedded Rust ecosystem. Given that the Raspberry PI is an SBC and not a microcontroller, I worried that there might not be such a board definition.
However, based on your comment it seems like I should be able to provide the embedded_hal to the oled_async driver somehow and I will thus give this option a try before I start implementing something more custom.
From what I've quickly found out, you'll need to create an interface from display-interface-spi to using the SPI from rppal. You can then provide this interface in the .connect() method in old_async, which you can then use with embedded_graphics API.
Fantastic - thanks for the help! I will start coding and come back here once I have tried it out. It might take a little while as I am doing this on my spare time.
Hi, well I have made no real progress and come to the conclusion that I have to learn more about embedded graphics before continuing. Currently the project is at a standstill... :-/
If/when I make some progress I will update here.
If you manage to get your tests to work, I would be very appreciative if you would share your solution.