Closed weboide closed 11 years ago
I've just tried this fix and it appears to work.
Why not create a pull request for this bug fix? It hard to imagine though why this is broken, maybe its just for some certain versions of the BBB. Surely it would be fixed already if it was broken for everyone.
I may do a pull request, but first I'm not sure if I have a good enough understanding of the BB or bonescript itself, and second I would need to make sure my fix is accurate and still allows bonescript to function properly on the Beaglebone White. That's why I decided about just posting it here in the first place.
It would be nice if someone that was currently working on developing the BBB could respond to the question about "how broken" things are. Am I one of the few or one of the many with this not working? Things work with an earlier image but not the more current ones. I was hoping the 6-6 image would have fixed this but alas no luck. Cheers, Wisar
I'm working on my first update since the 4.13 image right now and attempting to incorporate fixes for any outstanding issues. The fix mentioned here cannot work because BeagleBone can also run the newer software. A test for what the kernel shares is more appropriate to determine which driver is being used and thus what scale is being used. If the latest version on the git tree still fails for you, please let me know. Version should report 0.2.2 if you have the latest.
The latest code is working for me on the 06.17 candidate image, though I'm still manually updating the BoneScript files. I'm going to close this for now. If you see the issue on an image newer than 06.17, please re-open or open a new issue.
jadonk, note that scaling may still need to be disabled on newer kernels or BBB. I'm not sure if it's BBB or the kernel that has a different setting, but the BBB with the latest angstrom reports the actual voltage in mV (1800 mV max), so there is no need to scale the returned value.
Thanks, that is good news. Any idea on when a post 6-17 image will be available for my flashing pleasure?
Cheers, Will
From: Jason Kridner notifications@github.com To: jadonk/bonescript bonescript@noreply.github.com Cc: Will Kostelecky willkostelecky@yahoo.com Sent: Tuesday, June 18, 2013 6:36 PM Subject: Re: [bonescript] analogRead does not work on Beaglebone Black (#39)
The latest code is working for me on the 06.17 candidate image, though I'm still manually updating the BoneScript files. I'm going to close this for now. If you see the issue on an image newer than 06.17, please re-open or open a new issue. — Reply to this email directly or view it on GitHub.
On a beaglebone black, the default bonescript installed through opkg (or even pulled from github) does not support reading using analogRead It fails with file not found "undefined/AIN3". Also, the beaglebone black does not need any value scaling, since the ADC returns raw voltage directly (in millivolts).
The patch below seems to fix the problem.
Package: bonescript Version: 1.0-r21.3 Linux beaglebone 3.8.11 #1 SMP Wed May 8 07:34:27 CEST 2013 armv7l GNU/Linux