Apologies for the delay, I spilled coffee on my notebook and it died. BBB rebooted
root@arm:/home/debian# ls /lib/firmware/ | grep ADC BB-ADC-00A0.dtbo root@arm:/home/debian# sudo sh -c "echo 'BB-ADC' > /sys/devices/bone_capemgr.9/slots" root@arm:~# dmesg | grep BB-ADC [ 214.438002] bone-capemgr bone_capemgr.9: part_number 'BB-ADC', version 'N/A' [ 214.438290] bone-capemgr bone_capemgr.9: slot #7: 'Override Board Name,00A0,Override Manuf,BB-ADC' [ 214.438792] bone-capemgr bone_capemgr.9: slot #7: Requesting part number/version based 'BB-ADC-00A0.dtbo [ 214.444710] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware 'BB-ADC-00A0.dtbo' for board-name 'Override Board Name', version '00A0' [ 214.444798] bone-capemgr bone_capemgr.9: slot #7: dtbo 'BB-ADC-00A0.dtbo' loaded; converting to live tree root@arm:~# lsmod Module Size Used by g_multi 47670 0 libcomposite 14299 1 g_multi arc4 1660 2 rtl8192cu 73560 0 rtlwifi 63798 1 rtl8192cu rtl8192c_common 51523 1 rtl8192cu mac80211 411868 3 rtlwifi,rtl8192c_common,rtl8192cu cfg80211 344277 2 mac80211,rtlwifi rfkill 16656 2 cfg80211 uio_pruss 3865 0 no adc module! but there is an entrz in the devices durectorz, so I think the module has been loaded correctly: root@arm:/sys/bus/iio/devices/iio:device0# ls dev in_voltage2_raw in_voltage5_raw name uevent in_voltage0_raw in_voltage3_raw in_voltage6_raw power in_voltage1_raw in_voltage4_raw in_voltage7_raw subsystem with no input: root@arm:/sys/bus/iio/devices/iio:device0# cat in_voltage0_raw 3760 compiling test.c with time iI got the awaited result: ...... 3883 3898 3914 3912 3918 3913 3913 3919 3914 3916 real 3.826 user 0.002 sys 2.639 pcpu 69.01 So I guess the problem lies in the program.. Il giorno martedì 16 febbraio 2016 21:40:06 UTC+1, William Hermans ha scritto: > > OK, so another possibility does come to mind. The values you're reading > are somehow becoming corrupt before you check them. So humor me here, and > honestly this is probably in your best interest anyhow. . . > > > 1. Reset your board, which is to say, reboot it, and make sure none of > your stuff for the ADC loads at boot. > 2. Follow my guide here, but keep in mind it is based on 4.x kernels. > So adjustments may have to be made > http://www.embeddedhobbyist.com/2015/10/beaglebone-black-ad > 3. Use the sysfs method of reading values out of the ADC, single shot > to double check raw values. > > So, again, my guide above is meant for kernels 4.x but should work for the > most part. File locations, and in where to echo to load capes is different, > and I'm not sure what else. The point is that you need an alternate way of > testing your ADC, and making sure it is not somehow your code. Let me know > if this fixes the values read out, and if it does, we'll have to pour > through your code. > > On Tue, Feb 16, 2016 at 12:53 PM, hllpc <[email protected] > <javascript:>> wrote: > >> >> Higher like 40k, in the firt piat i wrote that the "translated" value is >> 11 volt. >> But it's variable, start from 0 and then invrease. Or somethime it's all >> zeroes, or only numbers repeated like 11 12 14 all over again >> Il giorno martedì 16 febbraio 2016 20:43:21 UTC+1, William Hermans ha >> scritto: >>> >>> OK, so define "way higher". Higher than 4095 ? >>> >>> On Tue, Feb 16, 2016 at 12:26 PM, hllpc <[email protected]> wrote: >>> >>>> Yes I know about the conversion raw values-> real values, two days ago >>>> the raw values where in the range0-2000 as they should have been, now they >>>> are way way higher >>>> >>>> -- >>>> 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] <javascript:>. >> 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.
