Jump to content

jps

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by jps

  1. 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.
  2. 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.
  3. 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.
  4. Hi. First at all, thank you for this. Orange Pi +2e + Armbian Debian GNU/Linux 10. When i run demo i have this error: Unrecognized board type, aborting... Problem initializing ArmbianIO library Pins connected to +5Vcc, pins 3 (SDA) y 5 (SCL). What i'm doing wrong? Thanks in advance.
  5. 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.
  6. wow. I just realized that the CPU temperature in armbianmonitor is the same that the one i have reading the DS18B20 sonda .... What is going on??
  7. And, what about the strange readings in thermal_zones. My cpu give me 22.6ºC with armbianmonitor, but reading directly in any of the thermal zones with cat i have readings like '40898'. What has changed from previous versions? Than you in advance.
  8. Yes. Thank you martinayotte. If sombody needs that, i just have to add this lines to '/boot/armbianEnv.txt' overlays=w1-gpio param_w1_pin=PA20 param_w1_pin_int_pullup=1 and works like a charm! Thank you very much.
  9. Hi. Recently i upgraded to Armbian_5.65_Orangepilite_Debian_stretch_next_4.14.78 and i have two problems. I can not read the thermal zones properly with neither of those: cat /sys/class/thermal/thermal_zone0/temp cat /sys/devices/virtual/thermal/thermal_zone0/temp cat /etc/armbianmonitor/datasources/soctemp because i have results like "30371". But when the system starts the correct temperature is displayed: Welcome to ARMBIAN 5.73 stable Debian GNU/Linux 9 (stretch) 4.19.20-sunxi System load: 0.07 0.15 0.10 Up time: 10 min Memory usage: 29 % of 493MB IP: 192.168.1.46 CPU temp: 33°C Usage of /: 10% of 15G and with armbianmonitor too: Time CPU load %cpu %sys %usr %nice %io %irq CPU C.St. 17:39:34: 1200MHz 0.06 3% 1% 1% 0% 0% 0% 34.6°C 0/15 17:39:39: 480MHz 0.06 1% 0% 0% 0% 0% 0% 31.5°C 0/15 17:39:45: 480MHz 0.13 4% 3% 0% 0% 0% 0% 31.8°C 0/15 My second problem is that my DS18B20 sonda does not work anymore. In /etc/modules-load.d/modules.conf i have: w1-sunxi w1-gpio w1-therm but there is nothing in /sys/bus/w1/devices/ is there any changes in this new version? I check the forum but i does not found anything. Any iddeas? Thanks in advance.
  10. Thanks Ucino, i arrived till there. In my first post i wrote: so, i need to read much more about how to compile a driver in a live Armbian distribution. Thank you anyway.
  11. But... I still have the doubt that what to do with the content of https://github.com/avafinger/gc2035........... I mean ... i don't know how to build a module. Anyway, all it's working, so thanks.
  12. Yes, 3.X kernel have the drivers. Works fine. Thank you. But... but I still have the doubt that what to do with the content of https://github.com/avafinger/gc2035. Thank again.
  13. Sure. Orange Pi Lite + CSI camera orange Pi native (Shenzhen Xunlong Software CO.,Limited) camera, and last Armbian for Lite Armbian_5.59_Orangepilite_Ubuntu_bionic_next_4.14.65. Thank you very much
  14. Excuse my clumsiness, but I don't know what to do with the files in https://github.com/avafinger/gc2035 i can not find the paths related in this link.... i can not make the camera work in last Armbian. Thanks any help...
  15. Hi. I am triyng to make Live Streaming for youtube with a HP Webcam, a Orange Pi Plus2e ethernet connected and Armbian but I can not make it work. I tried with FFMPEG and Aconv and I can see that the video is called, seems to work and I can see the statistics, but the stream does not arrive to youtube servers.... OBS Studio does not work. Any iddeas suggestions? Thank you in advance
  16. Yes!. It was the "&" at the end of the calls to the scripts. The 3 of them... Now i have too a "/tmp/botones.log". With that and the "sleep.time(0.1)" at the end of the while, all works fine. Thank you both!!!
  17. By the way, in my rc.local i have other scripts that runs normally: #!/bin/sh -e # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. /etc/init.d/entrehoras.sh # CÁMARA HP /etc/init.d/runmjpg.sh # Cámara GEMBIRD #/etc/init.d/runmjpgGEMBIRD.sh nohup python /home/orangepi/scripts/botones.py > /tmp/botones.log 2>&1 #/etc/init.d/botones.sh exit 0
  18. With: nohup python /home/orangepi/scripts/botones.py > /tmp/botones.log 2>&1 in rc.local, nothing in /tmp folder..... And the script does not run at boot.
  19. I can not make it work from rc.local... i tried to launch with: nohup python /home/orangepi/scripts/botones.py & and with and without sudo but nothing never runs. I tried too to run from /etc/init.d/.... What am i lossing?
  20. Well, now the consume of CPU lower to 0,1%... thank you very much. BUT... still dying. The file is in /etc/init.d/ and have +x permission. The file starts but after a while dies.... The Python file is called "botones.py". In syslog: Nov 7 16:31:03 localhost systemd[1]: botones.py.service start operation timed out. Terminating. Nov 7 16:31:03 localhost rsyslogd-2007: action 'action 17' suspended, next retry is Tue Nov 7 16:31:33 2017 [try http://www.rsyslog.com/e/2007 ] Nov 7 16:31:03 localhost systemd[1]: Failed to start (null). Nov 7 16:31:03 localhost systemd[1]: Unit botones.py.service entered failed state. If i run from the monitor, never dies....
  21. Hi. I have made a system with O Pi Lite and Armbian to automate an aquarium from where to control the light, the bubbles and with a webcam I can see the system through the web, everything automated from Cron. From a web page I can turn on and off the lights and bubbles from web buttons. Everything is fine. The problem arises when I want to put some phisical buttons for 3 things: turn off the system, change the state of light and bubbles. I have used a code in Python and the PYA20 library. This is the code. It works very well, but when I start it with the system, the program stop working soon and the buttons stop to work. #!/usr/bin/env python from pyA20.gpio import gpio from pyA20.gpio import port import subprocess import time import os # PIN 29 - IN Light (luz) onoff = port.PA7 # PIN 7 - IN Bubbles (burbujas) luzboton = port.PA6 # PIN 8 - IN Shutdown burbujasboton = port.PA13 # OUT Pins luzvivo = port.PA8 burbujasvivo = port.PA9 gpio.init() #Button ON-OFF gpio.setcfg(onoff, gpio.INPUT) gpio.pullup(onoff, gpio.PULLUP) #Button light gpio.setcfg(luzboton, gpio.INPUT) gpio.pullup(luzboton, gpio.PULLUP) #Button bubbles gpio.setcfg(burbujasboton, gpio.INPUT) gpio.pullup(burbujasboton, gpio.PULLUP) # OUT gpio.setcfg(luzvivo, gpio.OUTPUT) gpio.setcfg(burbujasvivo, gpio.OUTPUT) while True: # PROCESS ON-OFF need 5 seconds to avoid mistaken shutdowns if gpio.input(onoff) == 0: #start counting pressed time print ("pulsado") time.sleep(5) if gpio.input(onoff) == 0 : os.system("shutdown now -h") # PROCESS LIGHT if gpio.input(luzboton) == 0: print ("pulsado luz") estadoluz = gpio.input(luzvivo) gpio.output(luzvivo, not estadoluz) time.sleep(1) # PROCESS bubbles if gpio.input(burbujasboton) == 0: print ("pulsado bubbles") estadoburbujas = gpio.input(burbujasvivo) gpio.output(burbujasvivo, not estadoburbujas) # To avoid bounce time.sleep(1) If i check the procces, i can see it, but i can also see that consumes a lot of CPU: ps aux | grep botones root 652 95.1 0.6 8552 3412 ? Rs 10:53 2:36 python /etc/init.d/botones.py start What i am doing wrong? Thank you in advance.
  22. Yes, PA5 is the middle pin of the serial debug port. I can move "weirdly" the servo from PA6, this pin of the serial debug port and pin 10, but i can not control the tremor movements...
  23. Orange Pi have a pin called PWM1 (PA6 - pin number 7) so it must be able to manage PWM. In script.bin configuration file it can be enabled and disebled... So must be possible. Still looking for a way to do it. Thank you guys.
  24. But Raspberry can manage it perfectly... I tried with WiringOP, WiringBP compatible con Banana Pi, orangepi_PC_gpio_pyH3... I think is more a library problem than a Linux problem.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines