Here is another micro:bit project.
This time I’ve made a project that can drive my raceway.
Everyone know that it can be very boring to race against yourself, but what if your micro:bit could race against you, or you can try how fast it is possible to drive your raceway.
All you need is your micro:bit, a transistor (you must find a transistor that is strong enough) two resistors, a raceway, something to connect the micro:bit to the raceway,
My first attempt was to copy the example from the kitronik inventor’s kit that shows how to control a motor from the micro:bit. First it looked ok, but the raceway was to demanding and the transistor blew up…
The first code:
Let the micro:bit control the motor speed with the command analog write pin p0 to “?”
Try to make a program with this two parts:
- On button A pressed change speed by “?”
- On button B pressed change speed by “-?”
If you use this code you can control the raceway like you do with your controllers
- Start on button A pressed.
- Set the speed and how long it should drive before you change the speed.
- analog write pin p0 to “?”
- pause (ms) “?”
- if you want you can also add a graph that show how fast you drive.
- plot bar graph of “speed” up to ” max speed”
See how fast you can drive.