樹莓派3安裝新版wiringpi-python避免錯誤提示Unable to determine hardware version

新版樹莓派3的系統可能不再兼容wiringpi-python,運行會提示:

Unable to determine hardware version. I see: Hardware? : BCM2835

- expecting BCM2708 or BCM2709.

If this is a genuine Raspberry Pi then please report this

to projects@drogon.net. If this is not a Raspberry Pi then you

are on your own as wiringPi is designed to support the

Raspberry Pi ONLY.

這是因為wiringpi-python庫還沒更新導致的,因此需要手動安裝wiringpi-python,感謝neuralpi為我們提供修改版的wiringpi-python

安裝之前,需要先安裝swig2.0和python-dev

sudo apt-get install swig2.0 python-dev

接下來安裝wiringpi-python:

git clone --recursive https://github.com/neuralpi/WiringPi-Python.git

cd WiringPi-Python/WiringPi

sudo ./build

cd ..

swig2.0 -python wiringpi.i

sudo python setup.py install

sudo python3 setup.py install

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容