-
Notifications
You must be signed in to change notification settings - Fork 6
Description
There are currently two tutorials for working with motors the basic one is here and just covers an intro to DC motors and how to use the Pico as a battery to make it turn on.
The more advanced tutorial is around using the motor controller and is more like you'll actually use the motor in the final assembly.
However, what I feel is missing is something in between.
I'd like a new lesson to fit in between these that shows how to connect the motor directly to a GPIO pin and ground and then use code to turn the motor on and off. And then a second part to that same lesson would be to use PWM to control the motor speed of the motor. Then point out at the end that we can control the motor speed with code, but not direction and that would be a great lead in to the existing motor controller lesson... which is one of the reasons why we use a motor controller to control speed and direction.
You can use the existing lessons linked above to get an idea for what's needed... I can create the diagram for it, so don't worry about that.
If you haven't worked with Pico's before, this new lesson will be just like the two LED lessons, but having the motor connected instead of the LED... So, the code would be pretty much identical to the LED labs. The first part just turn the pin on to get it to move and the second part using PWM to control the speed.