I'm sure this library works just fine but I'm missing some piece here. I'm trying to drive an SSD1351 LCD with OPi.GPIO + Luma.OLED however I'm not having much luck. Here is what I did:
From what I understand of https://github.com/rm-hull/OPi.GPIO/blob/master/nanopi/m4.py my physical pin 11 maps to GPIO 33 and physical pin 13 to GPIO 35. Is this even correct?
Now it fails with the following output:
Traceback (most recent call last):
File "luma.examples/examples/3d_box.py", line 129, in
device = get_device()
File "/root/luma.examples/examples/demo_opts.py", line 61, in get_device
device = cmdline.create_device(args)
File "/usr/local/lib/python3.7/dist-packages/luma/core/cmdline.py", line 246, in create_device
device = Device(serial_interface=interface(), **params)
File "/usr/local/lib/python3.7/dist-packages/luma/core/cmdline.py", line 161, in spi
gpio=self.gpio or GPIO)
File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 299, in init
bitbang.init(self, gpio, transfer_size, reset_hold_time, reset_release_time, DC=gpio_DC, RST=gpio_RST)
File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 187, in init
self._DC = self._configure(kwargs.get("DC"))
File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 200, in _configure
self._gpio.setup(pin, self._gpio.OUT)
File "/usr/local/lib/python3.7/dist-packages/OPi/GPIO.py", line 470, in setup
pin = get_gpio_pin(_mode, channel)
File "/usr/local/lib/python3.7/dist-packages/OPi/pin_mappings.py", line 80, in get_gpio_pin
return _pin_map[mode][channel]
KeyError: 33
Hello,
I'm sure this library works just fine but I'm missing some piece here. I'm trying to drive an SSD1351 LCD with OPi.GPIO + Luma.OLED however I'm not having much luck. Here is what I did:
RST > GPIO1_A1(3V) > M4 Pin 11 > LCD RST Pin (white) DC > GPIO1_A3(3V) > M4 Pin 13 > LCD DC Pin (green)
ls /dev/spi* /dev/spidev1.0
python3 luma.examples/examples/3d_box.py --display=ssd1351 --interface=spi --width=128 --height=128 --spi-bus-speed=16000000 --bgr --spi-device=1 --spi-port=0 --gpio-reset=35 --gpio-data-command=33 --gpio=OPi.GPIO --gpio-mode=nanopi.m4.BOARD
Traceback (most recent call last): File "luma.examples/examples/3d_box.py", line 129, in
device = get_device()
File "/root/luma.examples/examples/demo_opts.py", line 61, in get_device
device = cmdline.create_device(args)
File "/usr/local/lib/python3.7/dist-packages/luma/core/cmdline.py", line 246, in create_device
device = Device(serial_interface=interface(), **params)
File "/usr/local/lib/python3.7/dist-packages/luma/core/cmdline.py", line 161, in spi
gpio=self.gpio or GPIO)
File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 299, in init
bitbang.init(self, gpio, transfer_size, reset_hold_time, reset_release_time, DC=gpio_DC, RST=gpio_RST)
File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 187, in init
self._DC = self._configure(kwargs.get("DC"))
File "/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py", line 200, in _configure
self._gpio.setup(pin, self._gpio.OUT)
File "/usr/local/lib/python3.7/dist-packages/OPi/GPIO.py", line 470, in setup
pin = get_gpio_pin(_mode, channel)
File "/usr/local/lib/python3.7/dist-packages/OPi/pin_mappings.py", line 80, in get_gpio_pin
return _pin_map[mode][channel]
KeyError: 33