Interfacing

WiringPi and RPi.GPIO is avalible

25 9918
Now everyone can try WiringPi and RPi.GPIO in the Raspbian v3.0. We do a lot of modifies to make the two gpio libraries be compatible with Banana Pi. Maybe have some little bugs, but please feedback here. LeMaker will try our best to fix them.
Sander  
Thanks, I will test WiringPI this weekend
Need it for my small home automation project.

I just tried the latest version of Raspbian for BananaPi in combination with RPi.GPIO. For python 2 I was successful:

However, for python3.2 I got the following error message:

  1. Python 3.2.3 (default, Mar  1 2013, 11:53:50)
  2. [GCC 4.6.3] on linux2
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> import RPi.GPIO as GPIO
  5. Traceback (most recent call last):
  6.   File "<stdin>", line 1, in <module>
  7. RuntimeError: This module can only be run on a Raspberry Pi!
Copy the Code


I manually downloaded the latest version of GPi.GPIO and installed it the following way
  1. sudo python3.2 setup.py install
Copy the Code

Did I do something wrong or is the current version not compatible with the BananaPi?

Never mind, got it working by recompiling the right version in /opt/gpio-lib/RPi.GPIO-0.5.5

Reply 3# comander

Do not use the RPi.GPIO you download from internet by yourself, it is not compatible with BP. We have modified the library, it is located at /opt/gpio_lib

ghoddan  
Hello,
i tried wiringPi on BananPi. But i have a problem. i wrote a test to see how fast i can toggle a pin. i wrote a simple while (1) loop in which i call two funktions: digitalWrite(1,0); digitalWrite(1,1);
When i look at the Signal on an Oszilloskope, it takes 1ms to toggle the pin. There ist no delay in loop. Is it not possible to toggle faster than that???
Thanks..

Reply 6# ghoddan

What is delay in the original wiringPi for Raspberry Pi. I think you can test it on the Raspberry Pi for a comparison.

Reply 6# ghoddan

Did you use the latest wiringPi in Raspbian v3.1?

Reply 6# ghoddan


    when set and get GPIO  register of A20 value,I delay 1 ms to steady the GPIO level.

ghoddan  
Hi,
@julie:
Thats the Problem... The delay of 1ms is much to long. The DHT22 answers within periods of 26 microseconds. So 1ms delay is way to much. Is it possible to change that julie?
Why is there no wiringPi.c file in the WiringPi folder?
@tony_zang:
I used the latest version 3.1 and i tried the same on Raspberry pi and the time for digitalWrite() on Rpi was 0,5 microseconds. So the bananapi takes 2000 times longer than the Rpi!?

You have to log in before you can reply Login | Sign Up

Points Rules