Open this page at https://hirolab.github.io/servo-motor-speed-control/
Use the shouldermotorspeed
block to control the direction and speed of the P0 servo motor.
basic.forever(function () {
shouldermotorspeed.SetTurnSpeed(input.acceleration(Dimension.X),2)
})
This repository can be added as an extension in MakeCode.
- open https://makecode.microbit.org/
- click on New Project
- click on Extensions under the gearwheel menu
- search for https://github.com/hirolab/servo-motor-speed-control and import
To edit this repository in MakeCode.
- open https://makecode.microbit.org/
- click on Import then click on Import URL
- paste https://github.com/hirolab/servo-motor-speed-control and click import
This image shows the blocks code from the last commit in master. This image may take a few minutes to refresh.
- for PXT/microbit