Giter Club home page Giter Club logo

Comments (13)

jwcooper avatar jwcooper commented on August 27, 2024

@bmillier What version of the library are you using? What Linux distribution?

from adafruit-beaglebone-io-python.

bmillier avatar bmillier commented on August 27, 2024

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.

jwcooper avatar jwcooper commented on August 27, 2024

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.

bmillier avatar bmillier commented on August 27, 2024

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.

jwcooper avatar jwcooper commented on August 27, 2024

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.

bmillier avatar bmillier commented on August 27, 2024

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.

johnnytolengo avatar johnnytolengo commented on August 27, 2024

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.

jwcooper avatar jwcooper commented on August 27, 2024

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.

johnnytolengo avatar johnnytolengo commented on August 27, 2024

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.

AdrianIRL avatar AdrianIRL commented on August 27, 2024

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.

wt9s avatar wt9s commented on August 27, 2024

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.

bmillier avatar bmillier commented on August 27, 2024

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.

cchart avatar cchart commented on August 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.