RE: Adafruit_BBIO and ErrorCodes/Seth

89 views
Skip to first unread message

Mala Dies

unread,
Oct 2, 2017, 4:39:54 PM10/2/17
to BeagleBoard
Hello,

I noticed that PWM, P8_13, on the BBBW is having issues with the Adafruit_BBIO framework. I have this software I found within a book I purchased, "Getting Started with BeagleBone" (Richardson 2014). Anyway, The software works without me using PWM but I would like to use PWM to make a LED go bright to dim just by using the web page format found via Flask (a Python Module). The error I incurred while running this software was this and only this: RuntimeError: Problem with a sysfs file.

So, here is the software:

    from flask import Flask, render_template
    app = Flask(__name__)
    import Adafruit_BBIO.GPIO as GPIO
    import Adafruit_BBIO.PWM as PWM

    PWM.start("P8_13", 0.0)

    @app.route("/")
    def hello():
        if GPIO.input(P8_11):
            doorStatus = "open"
        else:
            doorStatus = "closed"
        templateData = {
            'doorStatus': doorStatus,
        }
        return render_template('main-door.html', **templateData)
    
    @app.route('/ledLevel/<level>')
    def pin_state(level):
        PWM.set_duty_cycle("P8_13", float(level))
        return "LED level set to " + "."
    
    if __name__ == "__main__":
        app.run(host='192.168.7.2', port=5000, debug=True) 

So, please give advice or if you are using Adafruit_BBIO, please allow me some "behind-the-scenes" look at the software to change to get things "cracking."

Seth

P.S. I am sure there is a cure. Direct me to the software and I can start on it. I found a link to the sourceforge items and software. Is this where I should begin?

Drew Fustini

unread,
Oct 2, 2017, 7:06:04 PM10/2/17
to Beagle Board
Hi, it looks like you also raised this issue on github:
https://github.com/adafruit/adafruit-beaglebone-io-python/issues/168

I prefer to continue the conversation inside that issue and have replied there.

thanks,
drew
> --
> 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 beagleboard...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/a1177a92-8161-40bb-ac4d-1d75b6f63d78%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Mala Dies

unread,
Oct 2, 2017, 8:33:16 PM10/2/17
to BeagleBoard
Okay Sir,

I will check it out soon.

Seth

Mala Dies

unread,
Oct 10, 2017, 11:09:35 PM10/10/17
to BeagleBoard
If you are pay attention Mr. Drew, LOOK online at the site where I was "complaining" and not remembering.

Sorry sir.

Seth

P.S. Thank you for the support.

Drew Fustini

unread,
Oct 10, 2017, 11:48:53 PM10/10/17
to Beagle Board
On Tue, Oct 10, 2017 at 10:09 PM, Mala Dies <fun...@gmail.com> wrote:
> If you are pay attention Mr. Drew, LOOK online at the site where I was
> "complaining" and not remembering.

I am not sure that I understand.

Are you referring to issue #168?

I see that you have closed it:
https://github.com/adafruit/adafruit-beaglebone-io-python/issues/168


thanks,
drew
Reply all
Reply to author
Forward
Message has been deleted
0 new messages