Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

AM2320 Beaglebone Black
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

AM2320 Beaglebone Black

by ohnomrbill on Tue Dec 17, 2019 11:17 am

Looking for documentation on interface of AM2320 to SDA/SCL on BeagleBone Black. CircuitPython install stuck on "Failed building wheel for hidapi"

ohnomrbill
 
Posts: 25
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 Beaglebone Black

by drewfustini on Sun Jan 05, 2020 7:11 pm

Is this the library that you are using?

https://github.com/adafruit/Adafruit_Ci ... hon_AM2320

Please run this command on your BeagleBone so I can view the version of Debian, kernel, and other configuration information:
Code: Select all | TOGGLE FULL SIZE
sudo /opt/scripts/tools/version.sh

drewfustini
 
Posts: 934
Joined: Sat Dec 26, 2015 1:19 pm

Re: AM2320 Beaglebone Black

by ohnomrbill on Tue Jul 21, 2020 10:58 pm

sorry for the delay... here goes:
git:/opt/scripts/:[029041f6866049997bbfd2c7667b3c6e8c95201c]
eeprom:[A335BNLT00A64313BBBK1801]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Stretch IoT Image 2020-06-01]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-g31a8ae0206]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2015.10-00001-g143c9ee]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-14-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0]
UBOOT: Loaded Overlay:[BB-HDMI-TDA998x-00A0]
kernel:[4.14.108-ti-r135]
nodejs:[v6.17.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20200709.0-0~stretch+20200709]
pkg:[bb-wl18xx-firmware]:[1.20200702.0-0~stretch+20200702]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.4-git20190227.1-0rcnee0~stretch+20190327]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~stretch+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal input i2c bluetooth netdev gpio admin spi iio docker tisdk weston-launch xenomai cloud9ide pwm eqep remoteproc]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[ 1.012934] remoteproc remoteproc0: wkup_m3 is available
[ 1.225328] remoteproc remoteproc0: powering up wkup_m3
[ 1.225445] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168
[ 1.229964] remoteproc remoteproc0: remote processor wkup_m3 is now up
[ 72.260029] remoteproc remoteproc1: 4a334000.pru is available
[ 72.278886] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[ 71.500753] pruss 4a300000.pruss: creating PRU cores and other child platform devices
[ 72.260029] remoteproc remoteproc1: 4a334000.pru is available
[ 72.260159] pru-rproc 4a334000.pru: PRU rproc node /ocp/pruss_soc_bus@4a326004/pruss@0/pru@34000 probed successfully
[ 72.278886] remoteproc remoteproc2: 4a338000.pru is available
[ 72.279005] pru-rproc 4a338000.pru: PRU rproc node /ocp/pruss_soc_bus@4a326004/pruss@0/pru@38000 probed successfully
dmesg | grep pinctrl-single
[ 0.696727] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[ 0.709360] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

ohnomrbill
 
Posts: 25
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 Beaglebone Black

by drewfustini on Wed Jul 22, 2020 5:51 am

Please post the full text from the terminal when running the CircuitPython library, or attach a screenshot of the terminal window.

Also, the eMMC bootloader is too old (year 2015) and is blocking the newer one installed on the microSD. This can often cause problems for setting the pins to the correct mode for a given functionality.

Run this command to remove the u-boot bootloader on the eMMC:
Code: Select all | TOGGLE FULL SIZE
sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=10

drewfustini
 
Posts: 934
Joined: Sat Dec 26, 2015 1:19 pm

Re: AM2320 Beaglebone Black

by ohnomrbill on Fri Jul 24, 2020 6:29 pm

thank you.... that worked to correct the boot loader...

ohnomrbill
 
Posts: 25
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 Beaglebone Black

by drewfustini on Sat Jul 25, 2020 7:32 am

Do you still get an error when installing the library?

drewfustini
 
Posts: 934
Joined: Sat Dec 26, 2015 1:19 pm

Re: AM2320 Beaglebone Black

by ohnomrbill on Sat Jul 25, 2020 8:54 am

Have not been able to install CircuitPython on the Beaglebone. Working through the layers of instructions...

ohnomrbill
 
Posts: 25
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 Beaglebone Black

by drewfustini on Sun Jul 26, 2020 10:19 am

You won't need CircuitPython itself, but instead Blinka (which is a CircuitPython compatibility layer for Linux boards) and the CircuitPython library that you want to use.

Have you tried installing Blinka?

Here are the instructions:
https://github.com/adafruit/Adafruit_Bl ... -from-pypi

Please paste the results so I can try to reproduce any errors.

drewfustini
 
Posts: 934
Joined: Sat Dec 26, 2015 1:19 pm

Re: AM2320 Beaglebone Black

by ohnomrbill on Sun Jul 26, 2020 12:15 pm

pip3 install Adafruit-Blinka

Installing collected packages: RPi.GPIO, rpi-ws281x, sysv-ipc, pyusb, aenum, pyserial, pyftdi, Adafruit-PlatformDetect, Adafruit-Blinka
Successfully installed Adafruit-Blinka-5.2.3 Adafruit-PlatformDetect-2.14.1 RPi.GPIO-0.7.0 aenum-2.2.4 pyftdi-0.51.2 pyserial-3.4 pyusb-1.0.2 rpi-ws281x-4.2.4 s ysv-ipc-1.0.1

Will install libraries next...

ohnomrbill
 
Posts: 25
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 Beaglebone Black

by ohnomrbill on Sun Jul 26, 2020 3:11 pm

from the 6.x bundle copied adafruit_am2320.mpy to /usr/local/lib/python3.5/dist-packages. This is the same folder as busio.py and board.py

Ran python3 am2320_simpletest.py

Traceback (most recent call last):
File "am2320_simpletest.py", line 4, in <module>
import adafruit_am2320
ImportError: No module named 'adafruit_am2320'

ohnomrbill
 
Posts: 25
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 Beaglebone Black

by ohnomrbill on Sun Jul 26, 2020 4:48 pm

Downloaded bundle-py and moved adafruit_am2320.py and folder 'adafruit_bus_device' to /usr/local/lib/python3.5/dist-packages/

Ran am2320_simpletest.py successfully..

Thank you for your help.. I am a happy camper...

ohnomrbill
 
Posts: 25
Joined: Sat Jan 30, 2016 5:03 pm

Re: AM2320 Beaglebone Black

by ohnomrbill on Sun Jul 26, 2020 5:53 pm

you were correct about retries. I am having to use try/except logic.

ohnomrbill
 
Posts: 25
Joined: Sat Jan 30, 2016 5:03 pm

Please be positive and constructive with your questions and comments.