Trouble

RPi.GPIO_BP is installing wrongly

6 1063
Hello,

I'm the enthousiastic user of BananaPI from my Domotica.

The problem is that I can't control the GPIO pins using Python27. I installed RPi.GPIO_BP from GitHub but during installation I got serveral warnings, like:
source/c_gpio.c:73:3: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]source/c_gpio.c:73:3: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]source/c_gpio.c:73:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint8_t *’ [-Wformat]source/c_gpio.c:73:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘volatile uint32_t *’ [-Wformat]
And when I try:
import RPi.GPIO as GPIO

I get an error: "No module named GPIO"


Does anyone have a solution for this ?


Best regards Maarten


alessia  
The warning is not the problem. "No module named GPIO" seems to be a general Python problem. Try it using  Python script instead of using IDE.

Dear Alessia,

Thanks for your reaction.

Sure that is the first thing I tried after the "warning" problem ; however when I run import GPIO_BP in the script, it returns not found. I'm affraid it it is not right installed.

Best regards Maarten

To be more precise, in the Python script I called:
import RPi.GPIO_BP as GPIO

And I also faced the problem before, but I then edit the code and maybe a Syntax error before the line or after the line cause the problem.

Dear Tony,

Thanks for your reaction.

As test a only executed one line of code in my script: import RPi.GPIO_BP as GPIO
I ran Python as root, so I don't think there is something wrog with the privaliges.

Maarten

What kind of the OS do you use? Raspbian or Lubuntu or Bananian?

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

Points Rules