I recently purchased a DC & Stepper Motor Bonnet for Raspberry Pi. I have the board installed on a raspberry pi 2 B running the latest updates of Raspbian Buster Lite. I've installed all the packages, dependencies, and tools as per the following tutorials:
https://learn.adafruit.com/adafruit-dc-and-stepper-motor-hat-for-raspberry-pi/overview
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/i2c-sensors-and-devices
https://github.com/adafruit/Adafruit_CircuitPython_Bundle
https://github.com/adafruit/Adafruit_CircuitPython_MotorKit
https://learn.adafruit.com/welcome-to-circuitpython?view=all
I've confirmed that the i2c bus sees something connected...
- Code: Select all | TOGGLE FULL SIZE
pi@motortest:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
pi@motortest:~ $
This is the example code I'm trying to run:
- Code: Select all | TOGGLE FULL SIZE
"""Simple test for using adafruit_motorkit with a stepper motor"""
import time
from adafruit_motorkit import MotorKit
kit = MotorKit()
for i in range(100):
kit.stepper1.onestep()
time.sleep(0.01)
However when I try to run code in
- Code: Select all | TOGGLE FULL SIZE
Python3
- Code: Select all | TOGGLE FULL SIZE
pi@motortest:~ $ sudo python3 motortest.py
Traceback (most recent call last):
File "motortest.py", line 1, in <module>
from adafruit_motorkit import MotorKit
File "/usr/local/lib/python3.7/dist-packages/adafruit_motorkit.py", line 55, in <module>
import board
File "/usr/local/lib/python3.7/dist-packages/board.py", line 165, in <module>
raise NotImplementedError("Board not supported {}".format(board_id))
NotImplementedError: Board not supported None
pi@motortest:~ $
Can someone please tell me if I missed something, or if I'm doing something wrong, or if there's something wrong with the latest CircuitPython package that is causing this problem? I have a fairly good working knowledge of Linux and the raspberry pi, but this is the first time I've really tried using a python driven i2c board and after 2 days of trying to figure this out on my own with posts on this forum and Google searches I'm getting nowhere :-(
Thank you,
JCL