Comments (13)
@bmillier What version of the library are you using? What Linux distribution?
from adafruit-beaglebone-io-python.
Thanks for your response Justin. The BBIO library I am trying is whatever was on the adafruit github when I followed the instructions on your tutorial on Saturday. I am new to Linux, with only raspi experience, so I am not sure how to tell what Angstrom version I have, except that I did reflash the BBBs onboard flash with the newest angstrom image a week or so ago. I assume it is 3.8 with the new D.tree feature, because Alexander Haim's PYbbio , which was written for an earlier kernal, did not work for me when I tried it (prior to trying Adafruit's BBIO library.)
Things are a lot easier to figure out on Raspi Wheezy compared to the BBB. I'm an 8 bit MCU veteran of 25+ years, but just started on Raspi/Linux 6 months ago.
If this is not enough info, I can take a look tomorrow, to figure out how to get the kernel revision. Seems odd the GPIO works, but the PWM throws syntax errors.
Regards
Brian Millier
Computer Interface Consultants
Sent from my iPad
Res: (902) 876-8645
Cell: (902) 403-6329
On 2013-06-30, at 8:25 PM, Justin Cooper [email protected] wrote:
@bmillier What version of the library are you using? What Linux distribution?
—
Reply to this email directly or view it on GitHub.
from adafruit-beaglebone-io-python.
Thank you for the details. Everything you mention looks like it should work just fine. I tested and built this with almost that exact same setup too. :)
I'll need to see if I can re-create this. Also, maybe try uninstalling/re-installing the library? The new installer makes this a bit easier.
from adafruit-beaglebone-io-python.
Hi Justin:
While I had only reflashed the eMMC on my BBB a few weeks ago, it
turns out that I was using an image from about 1 month back NOT the
6-20-2013 version. So, I was wrong about it being the newest image.
After reflashing with the 6-20 image, and re-installing the Adafruit
BBIO library, I did not get the same error, and can see the PWM
waveform OK on my 'scope ( however the stated duty cycle is actually an
ACTIVE LOW PWM i.e. signal is low for the % time stated in the
command). Such an active low PWM signal is well known to me in my MCU
work, and involves setting up the PWM as either active low or active
high. But it might be worth noting in the tutorial.
When I first wrote you, I was just executing each BBIO PWM command
from the python command line. Now, I am making up a small file with the
necessary commands and running it. I am not sure if this would have made
a difference before I re-flashed.
While I can stop the PWM waveform using the cleanup command, if I use
the command
PWM.disable("P9_14")
I get the error
"attribute error: module object has no attribute 'disable'
either inside a python program or at the python command line (in both
cases following an import command, and the PWM.start command). The PWM
waveform does not stop of course.
Hope this is useful to you. My initial assumption that the PYBBIO
lib was not working on my BBB has due to the fact that Alexander's lib
was known not to work with the newer distro, due to Dev. Tree changes (
I think.) So, I assumed that mine must be the newer version, and that
yours (adafruit's) would work OK.
I'd like to comment that the great tutorials on adafruit's site for
Raspi and now BBIO. Even as an AVR MCU hardware/software veteran, I had
no prior LINUX/Python experience , nor any experience with the Broadcom
chip on the Raspi, so these tutorials were helpful.
Now, if I could only get something like the IDLE GUI for python to
work on the BBB, as well as the TKINTER lib, that I also use to write my
own python progs on the Raspi. So far, no luck!
regards
Brian Millier
Computer Interface Consultants
31 Three Brooks Drive
Hubley N.S. B3Z 1A3
DAL: 494-3709
CELL: (902)403-6329
RES: (902) 876-8645
[email protected]
On 01/07/2013 4:32 PM, Justin Cooper wrote:
Thank you for the details. Everything you mention looks like it should
work just fine. I tested and built this with almost that exact same
setup too. :)I'll need to see if I can re-create this. Also, maybe try
uninstalling/re-installing the library? The new installer makes this a
bit easier.—
Reply to this email directly or view it on GitHub
#6 (comment).
from adafruit-beaglebone-io-python.
Thank you for the detailed reply and compliments! It's quite useful (especially knowing that PWM has issues in that older release).
I just found the PWM.disable typo in the PWM guide, and have updated it. It should be PWM.stop("P9_14"). Not sure how that one made it in!
This library is moving pretty fast as the BeagleBone kernel changes go in. Right now the entire environment is kind of in flux, and changing weekly. It's a challenge getting everything working (and to continue working!). :)
from adafruit-beaglebone-io-python.
Thanks for your help Justin
Brian Millier
Computer Interface Consultants
-------- Original message --------
From: Justin Cooper [email protected]
Date: 07-02-2013 9:44 PM (GMT-04:00)
To: adafruit/adafruit-beaglebone-io-python [email protected]
Cc: bmillier [email protected]
Subject: Re: [adafruit-beaglebone-io-python] PWM not starting (#6)
Thank you for the detailed reply and compliments! It's quite useful (especially knowing that PWM has issues in that older release).
I just found the PWM.disable typo in the PWM guide, and have updated it. It should be PWM.stop("P9_14"). Not sure how that one made it in!
This library is moving pretty fast as the BeagleBone kernel changes go in. Right now the entire environment is kind of in flux, and changing weekly. It's a challenge getting everything working (and to continue working!). :)
—
Reply to this email directly or view it on GitHub.
from adafruit-beaglebone-io-python.
I am trying BBB PWM with the Adafruit_BBIO 0.0.15 library and Ubuntu 13.04 kernel 3.8.13
result:
RuntimeError: You must start() the PWM channel first
Any way to fix this?
Thanks.
from adafruit-beaglebone-io-python.
Are you using the latest version (looks like bone24 kernel)? User reports mention it's fixed:
http://elinux.org/BeagleBoardUbuntu#eMMC:_BeagleBone_Black
from adafruit-beaglebone-io-python.
you are right!
Linux arm 3.8.13-bone24 #1 SMP Sat Jul 13 12:26:49 UTC 2013 armv7l armv7l armv7l GNU/Linux
Works for me.
Thank you.
from adafruit-beaglebone-io-python.
Huhm, that worked for Johnny but not for me ! Still get the same "You must start() the PWM channel first"
from adafruit-beaglebone-io-python.
Anything further on this issue? I have the same problem here with a new Beaglebone Black. Angstrom rel v2012.12, kernel 3.8.13.
I tried the pip install and the manual install. BBIO version is 0.0.19
Thanks,
Jay
from adafruit-beaglebone-io-python.
While It did work for me under Angstrom, I gave up on Angstrom for other reasons and recently switched to Debian. While Adafruit's drivers worked under Debian for me as far as UART , GPIO and I2C were concerned, I was unable to get the PWM drivers to work. No errors show up, but no PWM either.
from adafruit-beaglebone-io-python.
Forgive the comment on an old thread, but it's the first google hit for the error we are getting:
RuntimeError: You must start() the PWM channel first
I was able to work around this temporarily by just running the python script I am using to test PWM as the super user. So it's not a problem with the adafruit beaglebone io tools! It is a permissions problem, and start() is failing silently. Check your permissions and see if sudo fixes anything. This worked for me on ubuntu 14.04, linux arm 3.8.13-bone67.
Can anyone suggest a fix or workaround for non-root users? What file do we need to chmod or chown during rc.local?
from adafruit-beaglebone-io-python.
Related Issues (20)
- Probably errant delays in GPIO/PWM HOT 2
- Errors during installing Adafruit_BBIO with Pip HOT 1
- Set pin mode failed for uart channel. (UART4) HOT 4
- Cannot initialize GPIO.INPUT on BeagleBone Black Ubuntu 20.04 HOT 2
- PWM test code doesn't work. "Runtime Error: unknowm error"
- BeagleBone Black Wireless PWM: RuntimeError: Problem with the cape manager
- Can't Seem to Install Adafruit BBIO Library on BBB (multiple definition error) HOT 3
- Beaglebone SPIs
- Python lock up while using ADC HOT 1
- ValueError: Set gpio direction failed, missing file or invalid permissions.
- Measure frequency
- Reading pulse encoder incorrect
- sudo pip3 install Adafruit_BBIO fails on Python >= 3.9 HOT 1
- UART no response after upgrade to Buster (similar issue to #291)
- Compilation Warnings when building CPP library
- ValueError: Set gpio mode failed, missing file or invalid permissions. HOT 1
- GPIO.add_event_detect : does not properly handle lambda expressions HOT 1
- documentation error in encoder.py
- P9_28 - P9_29 - P9-31 pins setup as GPIO problem HOT 2
- SPI bits per word increase from 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit-beaglebone-io-python.