2bec29bdd1
* first draft * fixed code section * calibration * fix broken link
453 B
453 B
Servo calibrator
let angle = 90
input.onButtonPressed(Button.A, () => {
angle -= 5
pins.servoWritePin(AnalogPin.P0, angle)
led.stopAnimation()
})
input.onButtonPressed(Button.B, () => {
angle += 5
pins.servoWritePin(AnalogPin.P0, angle)
led.stopAnimation()
})
basic.forever(() => {
basic.showNumber(angle)
})
pins.servoWritePin(AnalogPin.P0, angle)
basic.showString("Press A or B to change servo angle")