Fwd: [beaglebone] Problem at running startup the BBB

21 views
Skip to first unread message

Hugo Casal

unread,
Nov 5, 2018, 10:06:04 PM11/5/18
to beagl...@googlegroups.com

---------- Forwarded message ---------
From: Hugo Casal <hcasalnc...@gmail.com>
Date: vie., oct. 26, 2018 12:58
Subject: [beaglebone] Problem at running startup the BBB
To: BeagleBone <beagl...@googlegroups.com>


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)

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 beaglebone+...@googlegroups.com.
To post to this group, send email to beagl...@googlegroups.com.
Visit this group at https://groups.google.com/group/beaglebone.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages