![]() |
Python GPIO Library for the Rock64 (R64.GPIO) - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85) +--- Forum: General Discussion on ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=86) +--- Thread: Python GPIO Library for the Rock64 (R64.GPIO) (/showthread.php?tid=5902) |
Python GPIO Library for the Rock64 (R64.GPIO) - Leapo - 03-28-2018 R64.GPIO aims to re-implement RPi.GPIO for the Rock64, with the goal of 100% code compatibility with the original Raspberry Pi module. The following functions are currently implemented and working:
I'm currently updating the library very frequently, so make sure to grab the latest code! Importing the R64.GPIO module:
RE: Python GPIO Library for the Rock64 (R64.GPIO) - xalius - 03-28-2018 Thanks for the update, I hope I get some time over the holidays to test some things.... RE: Python GPIO Library for the Rock64 (R64.GPIO) - Leapo - 04-03-2018 Just updated the llibrary with software PWM support. PWM currently defaults to high-precision mode. This mode achieves the highest possible PWM timing accuracy, and works the same on all platforms/kernels, but uses a lot of CPU time due to the use of a busy-wait. Low-precision mode is much lighter, but accuracy is kernel-dependent. You'll have to test low-precision mode to see if it's adequate for your needs. Low-precision mode can be enabled by passing "pwm_precision=GPIO.LOW" as an argument for start() RE: Python GPIO Library for the Rock64 (R64.GPIO) - i69fstop - 04-08-2018 thank you @Leapo , can't wait to test it out.... so excited RE: Python GPIO Library for the Rock64 (R64.GPIO) - i69fstop - 04-08-2018 Hi @Leapo I have this error..running Code: R64-GPIO-test.py Code: root@rock64:/home/Rock64-R64.GPIO# sudo python R64-GPIO-test.py @Leapo I update to 4.4.120, it fixed the issue with IO error Code: Linux rock64 4.4.120-rockchip-ayufan-209 #1 SMP Mon Apr 2 16:05:07 UTC 2018 aarch64 GNU/Linux RE: Python GPIO Library for the Rock64 (R64.GPIO) - Leapo - 04-09-2018 (04-08-2018, 04:11 AM)i69fstop Wrote: I update to 4.4.120, it fixed the issue with IO error So it's all working now? ![]() I've updated the readme on the GitHub repo to include the test platform (Ayufan 0.5.15, Debian Jessie, 32bit). I can't guarantee that this library will work on newer/older releases until tested. RE: Python GPIO Library for the Rock64 (R64.GPIO) - tllim - 04-09-2018 (04-09-2018, 10:29 AM)Leapo Wrote:(04-08-2018, 04:11 AM)i69fstop Wrote: I update to 4.4.120, it fixed the issue with IO error Thanks and appreciate on your GitHub contribution :-) RE: Python GPIO Library for the Rock64 (R64.GPIO) - mark79 - 04-10-2018 Thanks a lot for the module. ![]() It would be great if you add "GPIO.add_event_detect". I need this for a motion python script. RE: Python GPIO Library for the Rock64 (R64.GPIO) - i69fstop - 04-11-2018 (04-09-2018, 10:29 AM)Leapo Wrote:(04-08-2018, 04:11 AM)i69fstop Wrote: I update to 4.4.120, it fixed the issue with IO error Hi @Leapo, Actually, it didn't work. There is no more error but when testing the the LED, it din't work. RE: Python GPIO Library for the Rock64 (R64.GPIO) - edupv - 04-11-2018 I'd like to report my test on the interrupt of the GPIO, I wish this will be help for the development. Hardware : Rock64 4GB (Rock64 V2 2017-0713) Software : bionic-minimal-rock64-0.6.31-209-arm64 (kernel 4.4.120). I tried interrupts with gpio-int-test.c on physical pin 16 (GPIO3_A5): Code: root@rock64:~# ./gpio-int-test 101 It had responses, but I found the followings :
The problem is : 10K pull-down resistor is quite small, and even with the 10K resistor, the pin voltage is still 0.443V, not close 0V. There should be something wrong. |