You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Beaglebone Enhanced and I too ran into the same issue as @sampathkmurthy with the ADC Error, but I was able to find the problem and also solve it too.
Finding the problem:
I tried to google for the solution and found out this website (link below): https://www.teachmemicro.com/beaglebone-black-adc/
wherein he has explained for the exact location to probe for ADC raw values on Beaglebone Black on the command line, which is:
/sys/bus/iio/devices/iio:device0
When I tried to find the same on Enhanced and probed into /devices folder for iio:devices0, there were three folders iio:devices0,1 and 2. The in_voltage#_raw (# is the number) was missing, so I checked the same at other locations and found it in iio:device2.
I cross checked the Adafruit_BBIO library, to find out from which location the library was probing the raw values from, on github and found out the c file (link) on line no 58 which had the probing location:
which will surely work for BBB, but may or may not work for other upgraded boards like Beaglebone Blue or Beaglebone Enhanced.
Solution:
What I did is I manually downloaded the complete Adafruit_BBIO library onto the board, and changed the location of the adc folder on the line as below (this is for Enhanced, you may need to find out yours)
and then reinstalled the library. After which I restarted the system and ran the adc example from Adafruit and it worked just perfectly fine.
What I would like to suggest to @pdp7 to keep the flexibility of providing the adc folder location through the code, instead of fixed locations, as an update to the library, as most of the new boards as an additional input, if in case the manufacturer have these locations changed, we can fix it in our codes itself.
The text was updated successfully, but these errors were encountered:
debian@bbb-pwr01-ser09:/sys/devices/platform/ocp/44e0d000.tscadc/44e0d000.tscadc:adc.0.auto/iio:device0$ ls
buffer in_voltage0_raw in_voltage2_raw in_voltage4_raw in_voltage6_raw name power subsystem
dev in_voltage1_raw in_voltage3_raw in_voltage5_raw in_voltage7_raw of_node scan_elements uevent
8:45
4.19.94-ti-r42
debian@bbb-pwr03-ser11:~$ uname -r ; ls /sys/devices/platform/ocp/44e0d000.tscadc/TI-am335x-adc.0.auto/iio\:device0/
4.19.94-ti-r42
buffer in_voltage0_raw in_voltage2_raw in_voltage4_raw in_voltage6_raw name power subsystem
dev in_voltage1_raw in_voltage3_raw in_voltage5_raw in_voltage7_raw of_node scan_elements uevent
8:45
copied from comment on closed issued #269 (comment)
@krupal756 wrote:
The text was updated successfully, but these errors were encountered: