Jump to content

iomari

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by iomari

  1. iomari

    ubuntu on ssd

    Greetings, Can I install and boot ubuntu from an ssd was the only storage device installed (no emmc, no microsd)> iomari
  2. Greetings, On the tinkerBoard, I'm using python. I having difficulty understanding why the functions don't return the values that is expected according tho the library help. I'm using python3 and the ASUS GPIO library. import ASUS.GPIO as GPIO GPIO.setmode(GPIO.BOARD) This is the output from ipython: In [18]: help(GPIO.gpio_function) Help on built-in function gpio_function in module ASUS.GPIO: gpio_function(...) Return the current GPIO function (IN, OUT, PWM, SERIAL, I2C, SPI) channel - either board pin number ,RK number or ASUS number depending on which mode is set. But when I try for instance: In [19]: GPIO.gpio_function(29) Out[19]: 1 AS you can see, the return value is '1' not (IN, OUT, PWM, SERIAL, I2C, SPI) Also if I run: In [20]: help(GPIO.getmode) Help on built-in function getmode in module ASUS.GPIO: getmode(...) Get numbering mode used for channel numbers. Returns BOARD, RK, ASUS or UNKNOWN Then I run: In [21]: GPIO.getmode() Out[21]: 10 As you can see, I'm not getting a return of 'BOARD, RK, ASUS or UNKNOWN' but instead I'm getting 10. IS it me or are the outputs to these functions wrong? iomari
  3. thanks. sco@TK-03:/$sudo su - -c "echo 24 > /sys/class/gpio/export" sco@TK-03:/$ sudo su - -c "echo in > /sys/class/gpio/gpio24/direction" -su: line 0: echo: write error: Invalid argument sco@TK-03:/$ sudo su - -c "echo 26 > /sys/class/gpio/export" sco@TK-03:/$ sudo su - -c "echo in > /sys/class/gpio/gpio26/direction" -su: line 0: echo: write error: Invalid argument sco@TK-03:/$ su -l Password: root@TK-03:~# echo 'in' > /sys/class/gpio/gpio26/direction -su: echo: write error: Invalid argument root@TK-03:~# ls -la /sys/class/gpio/gpio26/ total 0 drwxr-xr-x 3 root root 0 Sep 25 14:02 . drwxr-xr-x 38 root root 0 Sep 25 14:02 .. -rw-r--r-- 1 root root 4096 Sep 25 14:02 active_low lrwxrwxrwx 1 root root 0 Sep 25 14:02 device -> ../../../pinctrl -rw-r--r-- 1 root root 4096 Sep 25 14:16 direction -rw-r--r-- 1 root root 4096 Sep 25 14:02 edge drwxr-xr-x 2 root root 0 Sep 25 14:02 power lrwxrwxrwx 1 root root 0 Sep 25 14:02 subsystem -> ../../../../../class/gpio -rw-r--r-- 1 root root 4096 Sep 25 14:02 uevent -rw-r--r-- 1 root root 4096 Sep 25 14:02 value export works, 2nd line doesn't
  4. same problem: # sudo su -c echo in > /sys/class/gpio/gpio/export # -bash: /sys/class/gpio/gpio/export: No such file or directory # sudo su -c echo in > /sys/class/gpio/gpio/gpio22/direction -bash: /sys/class/gpio/gpio/gpio22/direction: No such file or directory as root: root@TK-03:~# echo in > /sys/class/gpio/gpio/export -su: /sys/class/gpio/gpio/export: No such file or directory root@TK-03:~# echo in > /sys/class/gpio/gpio22/direction -su: /sys/class/gpio/gpio22/direction: No such file or directory root@TK-03:~#
  5. Thanks for your reply. I work primarily from python. But I ran the commands you suggested: # sudo echo 22 > /sys/class/gpio/export # -bash: /sys/class/gpio/export: Permission denied # sudo echo in > /sys/class/gpio/gpio22/direction # -bash: /sys/class/gpio/gpio22/direction: No such file or directory
  6. Greetings, After setting my tinkerboard pins 22 and 24 as an Inputs, they reverts to being an output pin on HIgh after around 30 seconds. What is the cause of this? Is this some kind of feature. I don't have this happen on any other pin other than these 2. iomari
  7. Greetings, can the NAS HAT for the Zero work on the Zero Plus2 H5? I have the Zero HAT, which connects to the Plus2 board, but when I connect a usb keyboard, it does not power it. Although a usb mouse lights up. I can't test the mouse fully because I'm using ubuntu server on the Plus2 which has no GUI. So again, is the problem that the Plus NAS HAT does not work on the Plus2? I see that there is a NAS HAT for the Plus2 with the same connectors that the Plus HAT has but it's smaller. Thanks in advance iomari
  8. Greetings, I just purchased the sata hat for the M4. The site page for the HAT explain that the HAT uses GPIO2 pwm pin. So obviously, the engineers who designed the HAT know how to program the GPIO2 pwm pin. Would you guys be so kind as to share this knowledge? I'm starting to get discourage with Friendly's customer service. I've been asking for help on this matter for weeks now with no response. Getting Discouraged iomari
  9. Greetings, I can't seem to find any documentation on how to access the only PWM port on the Nano M4 which happens to reside on the 2nd set of pins. It's listed as GPIO2 and the PWM pin is pin 23 which they label as GPIO_C6/PWM1(3V). SInce any documentation I find on GPIO has to do with the 40 pin port, how can I program the PWM using wiringPI-Python? I wonder why Nano chose to disregard the other PWM pins that other Raspberry Pi type boards retained like the Asus Tinkerboard. Or am I missing something? If so, can someone enlighten me as to how to access PWM on the Nano M4. Preferably using Python 3.
  10. iomari

    Nano M4 GPIO2

    Greetings, I can't seem to find any documentation on how to access the only PWM port on the Nano M4 which happens to reside on the 2nd set of pins. It's listed as GPIO2 and the PWM pin is pin 23 which they label as GPIO_C6/PWM1(3V). SInce any documentation I find on GPIO has to do with the 40 pin port, how can I program the PWM using wiringPI-Python? I wonder why Nano chose to disregard the other PWM pins that other Raspberry Pi type boards retained like the Asus Tinkerboard. Or am I missing something? If so, can someone enlighten me as to how to access PWM on the Nano M4.
  11. Thanks alot. You've been most helpful.
  12. It works as python 2 now. Thanks for your patience. Now if only I can't figure out the problem with python 3.......
  13. [iomari@NanoPi-M4]─[~/code/setuptools-33.1.1]─[0]─[5291]-[][:)][Mon,Mar 25, 2019 05:32:45 pm] --> sudo easy_install wiringpi-2.44.4-py3.6-linux-aarch64.egg Processing wiringpi-2.44.4-py3.6-linux-aarch64.egg removing '/usr/local/lib/python3.6/dist-packages/wiringpi-2.44.4-py3.6-linux-aarch64.egg' (and everything under it) creating /usr/local/lib/python3.6/dist-packages/wiringpi-2.44.4-py3.6-linux-aarch64.egg Extracting wiringpi-2.44.4-py3.6-linux-aarch64.egg to /usr/local/lib/python3.6/dist-packages wiringpi 2.44.4 is already the active version in easy-install.pth --> ipython3 Python 3.6.7 (default, Oct 22 2018, 11:32:17) Type 'copyright', 'credits' or 'license' for more information IPython 7.3.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import wiringpi as wpi In [2]: wpi.wiringPiSetup() Oops: Unable to determine board revision from /proc/cpuinfo -> No "Hardware" line -> You'd best google the error to find out why.
  14. Building dependency tree... Reading state information... python-dev is already the newest version (2.7.15~rc1-1). python-setuptools is already the newest version (39.0.1-2). python3-setuptools is already the newest version (39.0.1-2). swig is already the newest version (3.0.12-1). git is already the newest version (1:2.17.1-1ubuntu0.4). python3-dev is already the newest version (3.6.7-1~18.04). The following packages were automatically installed and are no longer required: python3-decorator python3-ipython-genutils python3-pexpect python3-pickleshare python3-prompt-toolkit python3-ptyprocess python3-pygments python3-simplegeneric python3-traitlets python3-wcwidth Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
  15. OK, I'll recheck everything again ...................
  16. I've followed your instructions to the letter. I'm not new to this. And while I appreciate all your efforts, that python function still does not work. I even tried it using python 2 but the result is the same. I've emailed the vendor many times and they have not replied yet other than to ask me which image am I using which I replied last week. I guess I'll just have to use C. Really a shame. This changes the whole scope of my project.
  17. Yes, I've already contacted them but no reply yet. I'll take your advice and compare the code. Thanks for the tip..
  18. pavelectric, I appreciate your help. However I have both the python and C versions installed. The C version works but I want to use python for this project. additionally, I don't see where WiringPi must be installed at all if using python let alone before. the WiringPi-Python page clearly states: 1 Introduction to WiringPi for Python The wiringPi for Python utility is an implementation of wiringPi in Python. It can be used in Python programs to access hardware such as GPIO/I2C/SPI/UART/PWM etc. It is a popular and powerful utility. FriendlyELEC has ported the wiringPi for Python utility for all existing FriendlyELEC-RK3399 based boards: NanoPi M4, NanoPi NEO4 and NanoPC-T4. Current version: 2.44 WiringPi's home page: http://wiringpi.com There is a C version too and here is the reference link: WiringPi for RK3399 Notice the red highlight. It does not say it is a requirement. But regardless, I installed it anyway for test purposes. Thanks iomari
  19. Thanks but I have already done all all of that. The error I posted above is after successfully installing WiringPi.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines