On Fri, 3 Jul 2020 08:02:20 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user
[email protected] wrote:
>
>Hello, i have a Beaglebone AI, i need read analog input with python code,
>example:
>
>import Adafruit_BBIO.ADC as ADC
The first thing to realize is that the BB AI does not support runtime
pin-mux changes. There is no config-pin tool available. The second is that,
due to some changes in Px_y assignments to chip "balls", Adafruit_BBIO may
not be compatible.
> ADC.setup()
>RuntimeError: Unable to setup ADC system. Possible causes are:
> - A cape with a conflicting pin mapping is loaded
> - A device tree object is loaded that uses the same name for a fragment:
As stated -- the loaded device tree does not have pins configured for
ADC mode (hopefully it doesn't require all potential ADCs to be set, and
can find those that are active)
>
>Please, help me, thank you.
You are going to have to edit the device tree source to define the
desired pin as analog input, compile it, and set up uEnv.txt to load this
device tree in place of the one that is already in place.
NOTE: I don't know if it is possible to provide just an overlay device tree
without modifying the primary device tree. Maybe start with
https://www.element14.com/community/community/project14/visionthing/blog/2019/11/16/beagleboard-ai-brick-recovery-procedure#jive_content_id_PINMUXING
or
https://github.com/MalavPatel3501/BeagleBone-AI--mpBBAI-IO-Python-Library
which is a replacement for Adafruit_BBIO (no ADC.setup() in the example
https://github.com/MalavPatel3501/BeagleBone-AI--mpBBAI-IO-Python-Library/blob/master/mpBBAI-ADC.py
as it is set up in device tree). Looking at the main file, it performs
everything through sysfs access.
Note that
https://github.com/adafruit/adafruit-beaglebone-io-python/issues/317
indicates the Adafruit_BBIO is not yet compatible with the BB AI.
--
Dennis L Bieber
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/50tuff55d5ejj71d5dvss5bq3adsd6eca2%404ax.com.