---------- Forwarded message ---------
From: Hugo Casal <[email protected]>
Date: vie., oct. 26, 2018 12:58
Subject: [beaglebone] Problem at running startup the BBB
To: BeagleBone <[email protected]>


Hello

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
GPIO.setup("USR3",GPIO.OUT)

while True:
GPIO.output("USR3",GPIO.HIGH)
time.sleep(2)
GPIO.output("USR3",GPIO.LOW)
time.sleep(2)

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, 0.0.0.0)
as the host in your scripts!



*Traceback (most recent call last):*

*  File "/var/lib/cloud9/Telemetria/alarmaprueba3.py", line 5, in <module>*

*    GPIO.setup("P9_16",GPIO.IN <http://GPIO.IN>)*

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

Thank you in advance

Hugo

-- 
You received this message because you are subscribed to the Google Groups
"BeagleBone" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/beaglebone.
For more options, visit https://groups.google.com/d/optout.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAGvkCdUhwiA9GgWKKRHrdNWe%2BF_v5N8tsMDrMLY0Dh3yOutYjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to