question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Control a SSD1351 RGB oled screen, with a FT232H Adafruit controller. SUCCESS

See original GitHub issue

Board : nvidia jetson tx2 (ARMv8) System : ubuntu 16.04 64bits Python 2.7 Linux kernel : 4.4.38

hello all, I’ll have some questions, 'cause I’d like to control a SSD1351 oled RGB screen(s) For that, I have a FT232H board, who creates SPI and GPIO capacities, from usb.

I installed luma package :

cd ~/luma/
sudo python setup.py install

sudo python
from luma.oled.device import ssd1351
ImportError: No module named luma.oled.device

?? Do you have an idea ? Thanks, Vincent PS : Merry christmas to you all !!!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
elpimouscommented, Dec 25, 2017

Hi. I finally had success !! Thanks a lot for help. Here is the mods for luma.oled use on ssd1351, with the FT232H controller :

Modify : luma/core/interface/serial.py : the SPI class :

    def __init__(self, spi=None, gpio=None, gpio_DC=10, gpio_RST=9):

        bitbang.__init__(self, gpio, 4096, DC=gpio_DC, RST=gpio_RST)

        try:
            #self._spi.open(port, device)
            self._spi = spi
        except (IOError, OSError) as e:
            if e.errno == errno.ENOENT:
                raise luma.core.error.DeviceNotFoundError('SPI device not found')
            else:  # pragma: no cover
                raise

save and close.

Now, on top on your python demo file, add this :

#------------ for FT232H module ------------------------------------------------------
from luma.core.interface.serial import spi
from luma.oled.device import ssd1351

# Import GPIO and FT232H modules.
import Adafruit_GPIO as GPIO
import Adafruit_GPIO.FT232H as FT232H

# Temporarily disable FTDI serial drivers to use the FT232H device.
FT232H.use_FT232H()
 
# Create an FT232H device instance.
ft232h = FT232H.FT232H()

# Pins initialization
CS = 8 #C0
RESET = 9 #C1
DC = 10 #C2

# Create an FT232H SPI object with the specified chip select pin.
serial = FT232H.SPI(ft232h, cs=CS)

# Create an FT232H GPIO object 
ft232h_gpio = ft232h

# Create the SSD1351 oled display object.
serial = spi(spi=FT232H.SPI(ft232h, cs=CS), gpio=ft232h_gpio, gpio_DC=DC, gpio_RST=RESET)
oled = ssd1351(serial)
#--------------------------------------------------------------------------------------

So, rename your device :

if __name__ == "__main__":
    try:
        #device = get_device()
        device = oled
        main()
    except KeyboardInterrupt:
        pass

Now, just power your oled screen with 5v offered by the Adafruit FT232H small board (limited to 500Mah) My robot, Alfred, is happy : it has 2 beautiful color eyes…

0reactions
TCB13commented, Sep 11, 2022

For future reference, now there’s a WCH CH347 based board for 5$ and the FT232H still cost around 15$.

https://www.cnx-software.com/2022/09/01/5-ch347-board-is-a-usb-2-0-bridge-to-i2c-spi-uart-jtag-and-gpio/

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSD1351 RGB OLED refreshing speed - Adafruit forums
Hi guys, I bought an Adafruit RGB OLED and I try to display temperature and pressure (coming from my BMP180). I successfully displayed...
Read more >
Adafruit 1.27" and 1.5" Color OLED Breakout Board
This OLED uses the SSD1351 driver chip, which manages the display. You can talk to the driver chip using 4-wire write-only SPI (clock,...
Read more >
Adafruit 2.8" and 3.2" Color TFT Touchscreen Breakout v2
These TFT displays are big (2.8" or 3.2" diagonal) bright (4 or 6 white-LED backlight) and colorful! 240x320 pixels with individual RGB pixel ......
Read more >
master contrast current control of SSD 1351 - Adafruit forums
Hi there, I have purchased a OLED Breakout Board - 16-bit Color 1.5" w/microSD holder from Adafruit. My control board is using arduino...
Read more >
CircuitPython Libraries on any Computer with FT232H
After all the FTDI devices are unplugged, plug in your FT232H ... was successfully replaced, open Device Manager from Control Panel or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found