Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 03 2019 04:30
    HarshaSatyavardhan commented #74
  • Dec 07 2017 19:59

    alexanderhiam on master

    Update README.md (compare)

  • Dec 07 2017 19:59

    alexanderhiam on master

    Update README.md (compare)

  • Sep 26 2017 16:31
    jlewallen18 commented #93
  • Sep 22 2017 21:05
    jlewallen18 opened #110
  • Sep 16 2017 06:06
    mrjaperez commented #18
  • Sep 16 2017 06:02
    mrjaperez commented #18
  • Aug 14 2017 19:16
    kdheepak commented #74
  • Aug 14 2017 19:07
    kdheepak commented #74
  • Jul 19 2017 03:15
    sarnold commented #82
  • Mar 01 2017 15:13
    jonturner53 commented #109
  • Mar 01 2017 15:13
    jonturner53 reopened #109
  • Mar 01 2017 15:12
    jonturner53 closed #109
  • Mar 01 2017 15:12
    jonturner53 commented #109
  • Mar 01 2017 15:00
    jonturner53 opened #109
  • Feb 27 2017 18:52
    jonturner53 opened #108
  • Oct 07 2016 17:29
    alexanderhiam commented #107
  • Oct 07 2016 17:09
    alexanderhiam commented #106
  • Aug 10 2016 17:36
    MatthewWest edited #107
  • Aug 10 2016 17:35
    MatthewWest opened #107
Karthik Nayak
@KarthikNayak
@alexanderhiam I had a look at the dmesg, figured that it was more of a driver problem
[   84.978822] bone-capemgr bone_capemgr.9: part_number 'PyBBIO-epwmss1', version 'N/A'
[   84.978903] bone-capemgr bone_capemgr.9: slot #7: generic override
[   84.978919] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 7
[   84.978935] bone-capemgr bone_capemgr.9: slot #7: 'Override Board Name,00A0,Override Manuf,PyBBIO-epwmss1'
[   84.979031] bone-capemgr bone_capemgr.9: slot #7: Requesting part number/version based 'PyBBIO-epwmss1-00A0.dtbo
[   84.979047] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware 'PyBBIO-epwmss1-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[   84.986006] bone-capemgr bone_capemgr.9: slot #7: dtbo 'PyBBIO-epwmss1-00A0.dtbo' loaded; converting to live tree
[   84.986182] bone-capemgr bone_capemgr.9: slot #7: #1 overlays
[   84.990755] bone-capemgr bone_capemgr.9: slot #7: Applied #1 overlays.
[   85.241964] bone-capemgr bone_capemgr.9: part_number 'PyBBIO-ehrpwm1', version 'N/A'
[   85.242036] bone-capemgr bone_capemgr.9: slot #8: generic override
[   85.242052] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 8
[   85.242068] bone-capemgr bone_capemgr.9: slot #8: 'Override Board Name,00A0,Override Manuf,PyBBIO-ehrpwm1'
[   85.242154] bone-capemgr bone_capemgr.9: slot #8: Requesting part number/version based 'PyBBIO-ehrpwm1-00A0.dtbo
[   85.242170] bone-capemgr bone_capemgr.9: slot #8: Requesting firmware 'PyBBIO-ehrpwm1-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[   85.243674] bone-capemgr bone_capemgr.9: slot #8: dtbo 'PyBBIO-ehrpwm1-00A0.dtbo' loaded; converting to live tree
[   85.243853] bone-capemgr bone_capemgr.9: slot #8: #1 overlays
[   85.244963] ehrpwm 48302200.ehrpwm: unable to select pin group
[   85.245281] bone-capemgr bone_capemgr.9: slot #8: Applied #1 overlays.
[   85.496425] bone-capemgr bone_capemgr.9: part_number 'bone_pwm_P9_16', version 'N/A'
[   85.496496] bone-capemgr bone_capemgr.9: slot #9: generic override
[   85.496511] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 9
[   85.496527] bone-capemgr bone_capemgr.9: slot #9: 'Override Board Name,00A0,Override Manuf,bone_pwm_P9_16'
[   85.496616] bone-capemgr bone_capemgr.9: slot #9: Requesting part number/version based 'bone_pwm_P9_16-00A0.dtbo
[   85.496632] bone-capemgr bone_capemgr.9: slot #9: Requesting firmware 'bone_pwm_P9_16-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[   85.496654] bone-capemgr bone_capemgr.9: slot #9: dtbo 'bone_pwm_P9_16-00A0.dtbo' loaded; converting to live tree
[   85.496936] bone-capemgr bone_capemgr.9: slot #9: #2 overlays
[   85.501260] bone-capemgr bone_capemgr.9: slot #9: Applied #2 overlays.
[  138.504843] bone-capemgr bone_capemgr.9: part_number 'bone_pwm_P9_14', version 'N/A'
[  138.504911] bone-capemgr bone_capemgr.9: slot #10: generic override
[  138.504927] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 10
[  138.504944] bone-capemgr bone_capemgr.9: slot #10: 'Override Board Name,00A0,Override Manuf,bone_pwm_P9_14'
[  138.505042] bone-capemgr bone_capemgr.9: slot #10: Requesting part number/version based 'bone_pwm_P9_14-00A0.dtbo
[  138.505058] bone-capemgr bone_capemgr.9: slot #10: Requesting firmware 'bone_pwm_P9_14-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
[  138.505079] bone-capemgr bone_capemgr.9: slot #10: dtbo 'bone_pwm_P9_14-00A0.dtbo' loaded; converting to live tree
[  138.505369] bone-capemgr bone_capemgr.9: slot #10: #2 overlays
[  138.514298] ehrpwm 48302200.ehrpwm: Period value conflicts with channel 1
[  138.521512] pwm_test pwm_test_P9_14.16: pwm_config() failed
[  138.534583] pwm_test: probe of pwm_test_P9_14.16 failed with error -22
[  138.534626] bone-capemgr bone_capemgr.9: slot #10: Applied #2 overlays.
[  269.491339] CAUTION: musb: Babble Interrupt Occurred
[  269.654568] CAUTION: musb: Babble Interrupt Occurred
[  269.824219]  gadget: high-speed config #1: CDC Ethernet (ECM)
So I was going through elinux Documentation
cd /opt/scripts/tools/
git pull
sudo ./update_kernel.sh
That updated the kernel, and that fixed the issue, I think you should update your wiki to reflect this, maybe until you take time to convert the code to C, which I guess you were planning to do sometime.
Anyways I think this should be conveyed to the users of PyBBIO so that if they're stuck in this situation, it'll help them out :)
Karthik Nayak
@KarthikNayak
If it helps, you suggest installing linux-image-3.8.13-bone70 on the Wiki (that has the problem), I updated it to linux-image-3.8.13-bone79, which seems to be the latest.
and has no problems.
Alex Hiam
@alexanderhiam
@KarthikNayak nice! I'll update the wiki soon, thanks for figuring that out!
akerbay
@akerbay
PyBBIO, key error on PWM, P8_19
akerbay
@akerbay
I may have gotten past the key error but now have an error in cape_manager.py: with "open(SLOT_FILE, 'wb') as f:, IOError: ....Permission denied: '/sys/devices/bone_capemgr.9/slots" but slots is a file, not a directory. So I'm very confused. Why would cape_manager.py write to the slots file?
akerbay
@akerbay
I see that I can run my program without getting the permission error if I start it with sudo python myProg.py but the PWM pulse rate is 2 kHz, not 100 kHz. Very strange.
akerbay
@akerbay
And now after rebooting the BBB, the PWM is not outputting anything. Very bizarre.
akerbay
@akerbay
I'm pretty sure the capemgr.9 error is causing the problem, requiring me to run my Python program as root. I suspect PyBBIO is writing to SLOT_FILE in order to enable the PWM pins. However, I am already enabling the PWM pins that I need by modifying the uEnv.txt, so I don't need to do the write and I will attempt to modify cape_manager.py to remove the write to /sys/devices/bone_capemgr.9/slots.
akerbay
@akerbay
Ok, I have gotten past the capemgr.9 error by reloading the Debian and all the Python stuff including the PyBBIO. So it seems that somehow it got clobbered. But still I must run my Python program with sudo python myProg.py. Hopefully that won't be a hindrance to getting my program to start up on boot. I will try crontab to see if it will accept a sudo command.
akerbay
@akerbay
Ok, never mind if anyone is following this. I found that I had to put delay in the ADC routine. Otherwise somehow the Debian would get clobbered. Now that ADC is working fine and all code is working fine with the 4D Systems 4DCAPE-70T and my analysis and GUI code. I had to either use a keyboard connected to the BBB USB port and either 1) start my code with sudo python myProg.py thru the Debian terminal program or 2) put a startup icon on the desktop and have it call a script to start my code. So all is well.
Harshit
@iamharshit
@alexanderhiam how can i calculate rpm of a quadrature encoder motor in beaglebone?? is there a direct method other than gpio rising for calculating??
Alex Hiam
@alexanderhiam
@akerbay so yeah, PyBBIO has to be run as root, because of the permissions of the sysfs and dev files used to interface with the kernel drivers. I have some ideas about how to implement a system where PyBBIO can be run as any user, but that won't likely be happening too soon.
@akerbay FYI you can do $ sudo crontab -e to edit the root users crontab, where you can start your program normally
@iamharshit are you still working with the same encoder? where you ever able to get it accumulating with the RotaryEncoder library?
Harshit
@iamharshit
@alexanderhiam I thought of doing multithreading(for timer interrupt)
@alexanderhiam here's my code , u can have a look , i havenot tried it yet
quangdai1406
@quangdai1406
I2C sample code
Michael Bykovski
@bykof
@alexanderhiam Hey, how do you think. Do I have to start my whole application as root if I want to use your library or are there any other possibilities
I thought of something like:
os.system('sudo su -')
Alex Hiam
@alexanderhiam
@bykof Yeah, you do need to run PyBBIO code as root, there's no way around that currently
akerbay
@akerbay
I never could get crontabs to start my Python code, possibly because I was also using a 4DSystems 4DCAPE-70T, don't know. However I set up a desktop icon that started my program and it's working very well. We finished a couple of systems to control paint flow for a painting facility in China and they worked well. Here's my desktop code:
akerbay
@akerbay
Whoops! I hit return and it kicked me out of gitter. [Desktop Entry]
Version=1.0
Exec=sudo python /home/Paint.py
Name=Paint
Comment=Start up Paint.py
Encoding=UTF-8
Terminal=false
Type=Application
Icon=/home/bigyellow.png My blog is at http://johnbakeree.blogspot.com/ I'm using the PWM output for my analog out signal, low-pass filtering the pulses and converting the voltage to a 0-20mA current. Using the PyBBIO ADC routine to read the current from a flow meter. Some dropouts in the ADC measurements and quite a bit of error, up to 9%, that I hadn't figured out and corrected. May have to use a real ADC like Alex had suggested if I can't resolve the error and dropout problems. I don't remember what ADC Alex suggested and will look for his email on my PC. Thanks.
rameshprakash
@rameshprakash
Hi

I followed the directions installing the pybbio. I tried the blink.py - it worked flawlessly. As I was interested in finding out the maximum speed - this GPIO could toggle - tried executing the speed_test.py - however this showed the following errors

debian@beaglebone:~/PyBBIO/tests$ sudo python speed_test.py
Could not load gpio1_6 overlay, resource busy could not configure pinmux for pin GPIO1_6

Can some one help me with this issue
rameshprakash
@rameshprakash
never mind.. i got this resolved
jlewallen18
@jlewallen18
Hi! I posted this as an issue on the repo but I figured I'd try and ask here as well, I encounter this console message when trying to run blink.py:
root@beaglebone:/usr/local/lib/PyBBIO/examples# python blink.py
Traceback (most recent call last):
  File "blink.py", line 7, in <module>
    from bbio import *
  File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.10-py2.7-linux-armv7l.egg/bbio/__init__.py", line 5, in <module>
    from .bbio import run, stop
  File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.10-py2.7-linux-armv7l.egg/bbio/bbio.py", line 10, in <module>
    from .platform import platform_init, platform_cleanup
  File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.10-py2.7-linux-armv7l.egg/bbio/platform/__init__.py", line 6, in <module>
    from beaglebone import *
  File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.10-py2.7-linux-armv7l.egg/bbio/platform/beaglebone/__init__.py", line 9, in <module>
    from i2c import I2C1, I2C2, Wire1, Wire2
  File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.10-py2.7-linux-armv7l.egg/bbio/platform/beaglebone/i2c.py", line 63, in <module>
    Wire1 = I2C1 = I2CBus(1)
  File "/usr/local/lib/python2.7/dist-packages/PyBBIO-0.10-py2.7-linux-armv7l.egg/bbio/platform/beaglebone/i2c.py", line 15, in __init__
    super(I2CBus, self).__init__(bus)
SystemError: NULL result without error in PyObject_Call
nobodyow3ns
@nobodyow3ns
Hi! I wish to know if PyBBIO would work with BeagleBone Blue?
Seth
@silver2row
Hello!
I mess around w/ the BBB and variations at times. I like Python, C/C++, and motors. I see that the PyBBIO is up for grabs. What is keeping people, you, from coming together on this project?
I have not found anyone that will take the repo and make use of it. I found some of my older books, circa 2015, that referenced this past library and useful library. Um...
What next?
Aw!
Harsha satya vardhan
@Harshasatyavar1_twitter
i want to work on PyBBIO for my upcoming gsoc. can anyone help me