jps Posted May 12, 2020 Posted May 12, 2020 Armbianmonitor: http://ix.io/2lQ3 Hello. I am trying to work with a 7-Segment LED Display Module (HT16K33) in a Orange Pi +2e, but I don't know how to start... Any iddea? Thank you in advance.
jps Posted May 21, 2020 Author Posted May 21, 2020 Is it even possible to run the 7-segment HT16K33 module with Armbian and Orange Pi? I'm trying with I2C and SMBus2 but can not make it work. I can see the module, but it is imposible to communicate with it: sudo i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: 70 -- -- -- -- -- -- -- Any help will be apreciated. Thank you in advance.
martinayotte Posted May 21, 2020 Posted May 21, 2020 2 hours ago, jps said: I can see the module, but it is imposible to communicate with it: If it been seen on the I2C bus, you can try some library such as the one from Adafruit ...
jps Posted May 21, 2020 Author Posted May 21, 2020 I tried this one based on micropython but when i install trought pip returns many errors: sudo -H pip3 install adafruit-circuitpython-ht16k33 ... error: invalid command 'bdist_wheel' ---------------------------------------- Failed building wheel for Adafruit-Blinka Running setup.py clean for Adafruit-Blinka Running setup.py bdist_wheel for adafruit-circuitpython-busdevice ... error ... error: invalid command 'bdist_wheel' ---------------------------------------- Failed building wheel for adafruit-circuitpython-busdevice ... And many more. Also it needs busio and board but can't find it. Also i installed adafruit-blinka alone (https://pypi.org/project/Adafruit-Blinka/) what have busio and board drivers, but it doesn't work either. The instalations is success, but after that the code can't find busio or board: sudo -H pip3 install adafruit-blinka Requirement already satisfied: adafruit-blinka in /usr/local/lib/python3.6/dist-packages Requirement already satisfied: Adafruit-PlatformDetect>=2.11.1 in /usr/local/lib/python3.6/dist-packages (from adafruit-blinka) Requirement already satisfied: Adafruit-PureIO>=1.1.5 in /usr/local/lib/python3.6/dist-packages (from adafruit-blinka) Requirement already satisfied: pyftdi>=0.40.0 in /usr/local/lib/python3.6/dist-packages (from adafruit-blinka) Requirement already satisfied: sysv_ipc in /usr/local/lib/python3.6/dist-packages (from adafruit-blinka) Requirement already satisfied: pyusb>=1.0.0 in /usr/local/lib/python3.6/dist-packages (from pyftdi>=0.40.0->adafruit-blinka) Requirement already satisfied: pyserial>=3.0 in /usr/local/lib/python3.6/dist-packages (from pyftdi>=0.40.0->adafruit-blinka) orangepi@orangepiplus2e:~$python3 -m pip install -U --user pip gpiod Collecting pip Downloading https://files.pythonhosted.org/packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl (1.5MB) 100% |████████████████████████████████| 1.5MB 185kB/s Collecting gpiod Downloading https://files.pythonhosted.org/packages/8e/9c/3818182fa32fd5db2a42be9c340d3d6accf8c256befc741c0a59d61d582c/gpiod-1.2.5.tar.gz Building wheels for collected packages: gpiod Running setup.py bdist_wheel for gpiod ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-kdvfombf/gpiod/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpkfkkyv80pip-wheel- --python-tag cp36: usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: -c --help [cmd1 cmd2 ...] or: -c --help-commands or: -c cmd --help error: invalid command 'bdist_wheel' ---------------------------------------- Failed building wheel for gpiod Running setup.py clean for gpiod Failed to build gpiod Installing collected packages: pip, gpiod Running setup.py install for gpiod ... done Successfully installed gpiod-1.2.5 pip-20.1.1 orangepi@orangepiplus2e:~$ sudo python3 ddd.py Traceback (most recent call last): File "ddd.py", line 9, in <module> import board File "/home/orangepi/.local/lib/python3.6/site-packages/board.py", line 93, in <module> from adafruit_blinka.board.orangepi.orangepipc import * File "/home/orangepi/.local/lib/python3.6/site-packages/adafruit_blinka/board/orangepi/orangepipc.py", line 3, in <module> from adafruit_blinka.microcontroller.allwinner.h3 import pin File "/home/orangepi/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/allwinner/h3/pin.py", line 4, in <module> PA0 = Pin(0) File "/home/orangepi/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/libgpiod_pin.py", line 34, in __init__ self._chip = gpiod.Chip("gpiochip0", gpiod.Chip.OPEN_BY_NAME) AttributeError: module 'gpiod' has no attribute 'Chip' I think i tried everithing... I don't know where to go.... Thank you for your response.
jps Posted May 21, 2020 Author Posted May 21, 2020 Or this one: https://www.raspberrypi-spy.co.uk/2018/11/raspberry-pi-7-segment-led-display-module-using-python/ orangepi@orangepiplus2e:~/Adafruit_Python_LED_Backpack$ sudo python3 7segment_counter.py Traceback (most recent call last): File "7segment_counter.py", line 32, in <module> display.begin() File "/home/orangepi/Adafruit_Python_LED_Backpack/Adafruit_LED_Backpack/HT16K33.py", line 53, in begin self._device.writeList(HT16K33_SYSTEM_SETUP | HT16K33_OSCILLATOR, []) File "/usr/local/lib/python3.6/dist-packages/Adafruit_GPIO-1.0.4-py3.6.egg/Adafruit_GPIO/I2C.py", line 129, in writeList File "/home/orangepi/.local/lib/python3.6/site-packages/Adafruit_PureIO/smbus.py", line 364, in write_i2c_block_data self._device.write(data) OSError: [Errno 6] No such device or address And this one based on SMBus that i installed previously: https://github.com/emcconville/HT16K33 sudo python3 clo.py !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Unable to load SMBus ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Switching to terminal emulation ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Traceback (most recent call last): File "clock.py", line 9, in <module> from _HT16K33 import FourDigit ImportError: cannot import name 'FourDigit' But does not work either.
Recommended Posts