bitbank2 / ArmbianIO

A C (+ Python and Java) library for simplifying access to I2C, SPI and GPIO on boards supported by Armbian
GNU General Public License v3.0
80 stars 27 forks source link

not working on RPi's #17

Closed wabmester closed 3 years ago

wabmester commented 3 years ago

Tried the demo on a Pi 3B+ and a Pi Zero WH. Both errored thusly:

Unrecognized board type, aborting... Problem initializing ArmbianIO library

uname: Linux servo 5.4.83-v7+

FWIW, there is no /run/machine-id with this kernel.

wabmester commented 3 years ago

It looks like others are determining board type via /proc/cpuinfo. Here's a dump from the Pi Zero:

cat /proc/cpuinfo processor : 0 model name : ARMv6-compatible processor rev 7 (v6l) BogoMIPS : 697.95 Features : half thumb fastmult vfp edsp java tls CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xb76 CPU revision : 7

Hardware : BCM2835 Revision : 9000c1 Serial : 000000005d9860ef Model : Raspberry Pi Zero W Rev 1.1

bitbank2 commented 3 years ago

For the RPI models, instead of calling AIOInit(), call AIOInitBoard("Raspberry Pi");