ValueError: The channel sent is invalid
See original GitHub issueHi,
I’m trying to run the example project using a SSD1322 display on a FriendlyCore OS on a NanoPi NEO Air.
Running sudo python examples/sys_info.py -f conf/myconfig.cfg
I’m getting an error:
Version: luma.oled 2.3.1 (luma.core 1.5.0)
Display: ssd1322
Interface: spi
Dimensions: 256 x 64
------------------------------------------------------------
Traceback (most recent call last):
File "examples/sys_info.py", line 111, in <module>
device = get_device()
File "/home/pi/luma.examples/examples/demo_opts.py", line 63, in get_device
device = cmdline.create_device(args)
File "/usr/local/lib/python2.7/dist-packages/luma/core/cmdline.py", line 178, in create_device
device = Device(Serial(), **vars(args))
File "/usr/local/lib/python2.7/dist-packages/luma/core/cmdline.py", line 160, in spi
gpio=self.gpio or GPIO)
File "/usr/local/lib/python2.7/dist-packages/luma/core/interface/serial.py", line 255, in __init__
bitbang.__init__(self, gpio, transfer_size, DC=gpio_DC, RST=gpio_RST)
File "/usr/local/lib/python2.7/dist-packages/luma/core/interface/serial.py", line 153, in __init__
self._DC = self._configure(kwargs.get("DC"))
File "/usr/local/lib/python2.7/dist-packages/luma/core/interface/serial.py", line 164, in _configure
self._gpio.setup(pin, self._gpio.OUT)
ValueError: The channel sent is invalid on a NanoPi
I have the following config defined:
--display=ssd1322
--interface=spi
--width=256
--height=64
--interface=spi
--spi-bus-speed=16000000
--spi-device=0
--gpio-data-command=201
--gpio-reset=1
I believe the FriendlyARM OS comes with the RPI.GPIO python package preinstalled which should have the right physical/gpio pin mappings. During the luma.examples
pip install I was keeping an eye on the install output and have seen no output that would suggest that the RPI.GPIO module was overwritten.
I think I have the wiring set up correctly, using the NHD-2.8-25664UCB2 display.
I wonder what the error message really means and what I could do to debug the problem forward. Any help would be appreciated, thanks.
PS: I did try this on an Armbian OS too (not the FriendlyARM Ubuntu, which doesn’t have the RPi.GPIO module preinstalled, I got a similar error there too, only it said ValueError: The channel sent is invalid on a Raspberry Pi
(this makes me believe that the RPI.GPIO library should be working fine?)
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (2 by maintainers)
Top GitHub Comments
@thijstriemstra Here you go, this output is a bit meaningless to me but I hope you may be able to shed some light. Thanks in advance.
https://gist.github.com/attilagyorffy/a74c833172b0106781cedcebced03255