[beaglebone] Problem at running startup the BBB


When I run any script in cloud9( inside BBB) in automatic mode ( running at startup), ie, at reboot or power on and off the unit and if I include the command lines GPIO.setup(“Px_xx”,GPIO.IN) or GPIO.setup(Px_xx, GPIO.OUT) inside of the script, it don’t execute. However , when I run the same scripts without this lines , they works well.

The BBB only running at startup when I make a code to turn on any of the leds USR1,USR2, USR3, but if I include any other commands lines the program stop. Also, when I run the same scripts in manual mode in cloud9 , all work well.

I tested with several GPIO pins and the same always happens

Do you have some idea what happen?

Bellow , I show one short script :

import Adafruit_BBIO.GPIO as GPIO
import time

GPIO.setup(“P9_16”,GPIO.IN) # this line is the problem

while True:

Additionally , bellow can you find the error code I get from cloud9

Your code is running at http://localhost.

Important: use os.getenv(PORT, 8080) as the port and os.getenv(IP, as the host in your scripts!

Traceback (most recent call last):

File “/var/lib/cloud9/Telemetria/alarmaprueba3.py”, line 5, in


ValueError: Set gpio direction failed, missing file or invalid permissions.

Thank you in advance