Jeff, is there any reason why you need to use python ? Because this should
be really easy ( under 20 lines of code ) to get the PWM set, and running
in C. Through using Linux sysfs

On Sat, Feb 20, 2016 at 6:49 PM, Jeff Pedlow <[email protected]> wrote:

> Hello again,
>
> As an addendum -- I tried installing the greycat labs bbio via apt-get.
> Sadly, every time that I try importing it via python, i get an immediate
> seg fault.
>
> cannot for the life of me figure out how to make PWM work. It's
> frustrating as someone who really wants to learn the platform but isn't a
> linux ninja :\
>
> Banging my head on the wall :(
>
> Any and all input is appreciated
>
> -
>
> On Sat, Feb 20, 2016 at 4:53 PM, Jeff Pedlow <[email protected]> wrote:
>
>> Hello Robert,
>>
>> Thank you very kindly for getting back to me.
>>
>> To clarify, do you mean I should install the greycatlabs bbio package?
>> and its compatible with 4.1? :)
>>
>> Reading:
>> https://github.com/graycatlabs/PyBBIO/wiki/Installing-PyBBIO
>>
>> it appears that it is not compatible with anything higher than 3.8?
>>
>>
>> Tried a couple things without much success:
>>
>> Wanted to see if it was installed from the getgo (as the adafruit library
>> was) First tried:
>> >>from bbio import * #
>> https://github.com/graycatlabs/PyBBIO/wiki/Using-PyBBIO
>>
>> And got a seg fault
>> Then further tried to see if the module was actually installed via:
>> >>help('modules')
>> and
>> pydoc modules
>>
>> and both seg faulted.
>>
>> I apologize for being 'a little slow' on this front.
>>
>> Thanks kindly! :)
>>
>> On Sat, Feb 20, 2016 at 2:08 PM, Robert Nelson <[email protected]>
>> wrote:
>>
>>>
>>> On Feb 20, 2016 3:54 PM, "Jeff Pedlow" <[email protected]> wrote:
>>> >
>>> > Hi Robert,
>>> >
>>> > Thank you VERY kindly for getting back to me. I am a little new to
>>> linux, but am trying to learn as I go here, so apologies if I'm not
>>> answering very well.
>>> >
>>> > OS:
>>> > EMMC flash image:
>>> https://rcn-ee.com/rootfs/2016-02-11/flasher/BBB-eMMC-flasher-debian-8.3-console-armhf-2016-02-11-2gb.img.xz
>>> > SD image:
>>> https://debian.beagleboard.org/images/bone-debian-8.3-lxqt-4gb-armhf-2016-01-24-4gb.img.xz
>>> >
>>> >
>>> > Using the stock installed python and adafruit python bbio library
>>> included on the SD image.
>>> >
>>> > First step was to see if I could make a PIN go hi/low to flash an LED
>>> using python (simple enough)
>>> > import Adafruit_BBIO.GPIO as GPIO
>>> > GPIO.setup("P8_10", GPIO.OUT)
>>> > GPIO.output("P8_10", GPIO.HIGH)
>>> > GPIO.output("P8_10", GPIO.LOW)
>>> >
>>> > And the LED hooked to P8_10 works and I can make it blink. Life is
>>> good. Huzzah!
>>> >
>>> >
>>> >
>>> > Next step.. was to TRY to run this in python: (from the adafruit bbb
>>> servo tutorial)
>>> > import Adafruit_BBIO.PWM as PWM
>>> > PWM.start("P8_13", 95.0, 60)
>>> > PWM.set_duty_cycle("P8_13", 97.0) #This Errors with: "IOError: [Errno
>>> 2] No such file or directory: '/slots'"
>>> > PWM.stop("P8_13")
>>> > PWM.cleanup() #This Errors with: "IOError: [Errno 2] No such file or
>>> directory: '/slots'"
>>>
>>> There's a patch for this but it breaks, 3.8..
>>>
>>> For now us pybbio lib.
>>>
>>> >
>>> > And nothing happens.
>>> >
>>> > From this point I've become successful at horribly confusing myself
>>> about listings in /sys/class and /lib/firmware and .dtbo files and
>>> /sys/devices/platform/bone_capemgr/slots and have NO idea where to go to
>>> get PWM to work in python, let alone how to successfully troubleshoot the
>>> issue.
>>> >
>>> > Any and all input appreciated. Really humbling experience thus far.
>>> >
>>> > Thanks
>>> >
>>> > -Jeff
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Sat, Feb 20, 2016 at 1:35 PM, Robert Nelson <
>>> [email protected]> wrote:
>>> >>
>>> >>
>>> >> On Feb 20, 2016 2:47 PM, <[email protected]> wrote:
>>> >> >
>>> >> > Hi There,
>>> >> >
>>> >> > Im trying to get a basic servo project running on my BBB
>>> >> >
>>> >> > I had installed Debian 8.3 (the image provided on the beaglebone
>>> page, running the 4.1 kernel) kernel on it and tried to get PWM working
>>> without success (apparently both the adafruit and greycat python bbio
>>> libraries only work on 3.8), interestingly enough bonescript also refuses
>>> to work.
>>> >> >
>>> >> >
>>> >> > I have tried reverting to earlier images via microsd without
>>> success:
>>> >> > -The Device doesnt become reachable via ping to 192.168.7.2 after
>>> several hours and attempting to power cycle
>>> >> > -The "External Drive" does not connect to windows upon boot
>>> >> > -While attempting to flash the emmc, the USRleds do not cycle in
>>> the 'cylon' style.
>>> >> >
>>> >> > I've tried to make the Debian 8.3 image work, via trying to install
>>> an older kernel via apt without success (the device appears to be operating
>>> but is unreachable via USB/ping/etc):
>>> >> > "sudo apt-get install linux-image-3.8.13-bone70
>>> linux-headers-3.8.13-bone70 mt7601u-modules-3.8.13-bone70"
>>> >> >
>>> >> >
>>> >> > I really DON'T know what to do -- I would have hoped that PWM would
>>> work out of the box on the default Debian 8.3 image. Perhaps there's
>>> something I need to do to make it work that isn't apparent to a novice like
>>> me.
>>> >> >
>>> >> > Unfortunately, rolling back to a 3.8 kernel via imaging or apt
>>> doesn't seem to allow the BBB to communicate with my windows machine after
>>> attempting to do so, and only 4.1 kernel images seem to work successfully
>>> in that sense, with the caveat that PWM doesnt work.
>>> >>
>>> >> PWM, should be working on v4.1, what software stack are you using to
>>> interface to the pwm's?
>>> >>
>>> >> Regards,
>>> >
>>> >
>>>
>>
>>
> --
> 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].
> 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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to