After running a basic GPIO program using the Adafruit python GPIO library(program found below) I think the program is continuously running (if possible) even though I restarted the board severely times. Whenever I plug LED's into either pins (P8_07 and P8_09) the LED very dimly turns on which I believe is what the program should do. As soon as I realized the program didn't include a GPIO.cleanup() I wrote a program that just sets both pins low and and call cleanup() and still no luck.
import Adafruit_BBIO.GPIO as GPIO
import time, os, sys
#if not os.geteuid() == 0:
# sys.exit('Script must be run as root')
pinOut = "P8_09"
tDelay = 0.1
GPIO.setup(pinOut, GPIO.OUT)
while True:
GPIO.output(pinOut, GPIO.HIGH)
time.sleep(tDelay)
GPIO.output(pinOut, GPIO.LOW)
time.sleep(tDelay)
I have been using current limiting resistors. It seems like both pins are producing a lil bit of voltage continuously. Is that a symptom of burnt out pins?
No, if you've been using resistors, your pins are probably not burnt out. Instead, they probably default to a high state after a restart. That's why it looks like your program is running.
Change your code so that it alternates the pins between high and low, with delays in-between. This will make the LEDs blink. The blinking should stop on a restart.
I wrote a program to toggle those pins that uses GPIO cleanup and still no luck. I don't think the pins are being set to logic high on restart because the LED I have hooked to the pins are barley glowing so i imagine they are outputting significantly less than the 3.3V logical level. When I run the same program on pin P8_11 the LED turns fully on and off
Yes! those commands got the pins to stop outputting a small voltage and toggled them on and off. Unfortunately they still don't work using the Adafruit GPIO python library. Here's the updated code i'm using:
mtangy wrote:Yes! those commands got the pins to stop outputting a small voltage and toggled them on and off. Unfortunately they still don't work using the Adafruit GPIO python library. Here's the updated code i'm using:
Hi, could you paste the output of the following commands?
# check what capes are loaded
cat sys/devices/bone_capemgr.*/slots
# check the version of Adafruit_BBIO installed
sudo cat /usr/lib*/python*/site-packages/Adafruit_BBIO*.egg-info/PKG-INFO |head
# check what Debian image is running
cat /etc/dogtag
# check which kernel is running
uname -a
# check which version of Debian
lsb_release -a
# check what capes are loaded
cat sys/devices/bone_capemgr.*/slots
cat: sys/devices/bone_capemgr.*/slots: No such file or directory
# check the version of Adafruit_BBIO installed
sudo cat /usr/lib*/python*/site-packages/Adafruit_BBIO*.egg-info/PKG-INFO |head
cat: /usr/lib*/python*/site-packages/Adafruit_BBIO*.egg-info/PKG-INFO: No such file or directory
# check what Debian image is running
cat /etc/dogtag
BeagleBoard.org Debian Image 2015-03-01
# check which kernel is running
uname -a
Linux beaglebone 3.8.13-bone70 #1 SMP Fri Jan 23 02:15:42 UTC 2015 armv7l GNU/Linux
# check which version of Debian
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.8 (wheezy)
Release: 7.8
Codename: wheezy
For some reason when I rebooted my BBB the pins went back to their previous state of outputting a small voltage until I exported the pins and set them as outputs.
Oops, I had a an error in the command to print out the cape config (e.g. slots). It should a "/" at the beginning. Please run this: sudo cat /sys/devices/bone_capemgr.*/slots
Also this command: sudo cat /sys/kernel/debug/pinctrl/*pinmux/pins
boss@beaglebone:/root$ sudo cat /sys/devices/bone_capemgr.*/slots
[sudo] password for boss:
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMI N
7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPIDEV1
boss@beaglebone:/root$ sudo cat /sys/kernel/debug/pinctrl/*pinmux/ pins
cat: /sys/kernel/debug/pinctrl/*pinmux/pins: No such file or direc tory
Thanks for helping me out. Also thanks for your video tutorial on setting up eQEP on the BBB. I used it to get my optical encoder working and it worked great. But do you know if i have to reinstall the cape plugin every time i restart the board? I don't think it saved last time
Last edited by mtangy on Fri Feb 05, 2016 9:41 pm, edited 1 time in total.
cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh --ti-channel --stable
If 4.1 kernel does not help, then you can revert back to the most recent 3.8 kernel:
sudo apt-get update
sudo apt-get install linux-image-3.8.13-bone79
Now change which kernel will boot:
sudo vi /boot/uEnv.txt
Comment out the 4.1 line and add 3.8 line:
#uname_r=4.1.15-ti-r40
uname_r=3.8.13-bone79