Reputation: 147
I want to make a simple project using BBB.I am following these steps from Web Site but there is no "AIN1" file on my BBB Screenshot and i don't understand where is the problem.
Upvotes: 1
Views: 137
Reputation: 99
There are two modes of ADC in BBB, For single shot mode just cat to the address
cat /sys/bus/iio/devices/iio:device0/in_voltage4_raw
If you want in continuous mode do the following and it should get you started properly.
Consider you want to start ADC 1, 5, then
echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage0_en
echo 1 > /sys/bus/iio/devices/iio:device0/scan_elements/in_voltage5_en
in terminal and then set buffer length by
echo 100 > /sys/bus/iio/devices/iio:device0/buffer/length
then start ADC
echo 1 > /sys/bus/iio/devices/iio:device0/buffer/enable
Upvotes: 1