Banana PI BPI-M2 Beery Automation Hat

Hey there,

I wanted to use a Banana Pi as RPI replacement with the Automation Hat.
The installation with the provided instructions were straight forward and the only
error that accured was abaout the certificate of the website.
After that i opend the test program for python3 like the one for the outputs but I get
every time the error that there is no ADC detected. If want to manually toggle some output,
then I get the message that I don’t have permisson for /dev/mem.
I tried serveral things like to start the program in sudo but the I get the respones no ADC detected.
I also checked if i2c is activated and tried several Banana PIs and Automation Hat boards.

Try to run your program with sudo to rule out any permission problems. If it works with sudo, you need to check permissions on /dev/mem and other hardware-ressources.

Thanks for the fast reply. I tried with sudo but I get the same error message
that no adc is connected. If I start phython3 with sudo and trie to set for exapmle
on output on high, I get the error message that I don’t have permisson for /dev/mem.
If want to give the user the permissions htan I get the message that I have the permission already and if I want to give the permission for memory space for the gpios than I get the message that there is no such dictonary or file.
The hardware works just fine with a original Raspberry Pi, so I assume that
the hardware is ok.

Could it be possible that the banana Pi isn’t supported? Because if I want to install the pimororni-dashboard and want to start this I get the error message that this version of raspian is not supported.

This does not make sense: if you run a program with sudo, then you usually have all the permissions of the world. Please post the result of

ls -laF /dev/mem

I know this makes no sense. Here are some screenshots so you could have a better picture of it.

pi@bpi-iot-ros-ai:~ $ ls -laF /dev/mem
crw-r----- 1 root kmem 1, 1 Oct 17 14:11 /dev/mem

The automation hat software uses some Pi specific libraries, like Rpi.GPIO. Did you install the Banana-Pi specific versions (if available)? I don’t know the BPI-M2, but it could very well be that it might has some compatible pin-locations, but not necessarily compatible mem-layout. Also check the smbus-library for BPI specifics.

What I would do: install i2ctools and run i2cdetect as a first step to make sure the system detects the chip at the correct address. If so, this will tell you that i2c is configured on OS-level and the chip is detected. So the problem is within the python setup.