Watch a fluid, sweeping animation with the servo.
Continuously iterate over a number from 0 to 100 and use it to set the position of the Servo A.
basic.forever(function () {
for (let index = 0; index <= 100; index++) {
sb.setServoPosition(sb.servo(SBServo.ServoA), index)
basic.pause(100)
}
})If using micro:bit for the first time, follow this setup.