Controlling DC Motors (with the motor bonnet) more documentation here
Plug the “bonnet” in while the pi is turned off
Do not reverse the orientation of the "bonnet" or you will damage the Pi
2. Install the required software:
From the Pi’s terminal, type the following:
sudo pip3 install adafruit-circuitpython-motorkit
3. Read this page about how to hook up the stepper motor. Every stepper motor is a little different.
4. Run this example code in Thonny stepper_motor.py
5. Plug in the motor power (9v-12v) and the motor should turn
Challenges:
Can you follow these instructions to control a stepper motor.
Experiment with the speed of the motor. For example, try kit.motor1.throttle = 0.3
Can you get two motors turning?
Can you have a motor turn for 5 seconds when a button is pressed (ask the instructor for a stacking header)
Can you have a motor turn only when the device is in the dark? (ask the instructor for a stacking header)
Can you control a motor over the internet with a custom interface?