Servo Buttons

Control the angle of a servo using a light sensor.

input.buttonD0.onEvent(ButtonEvent.Click, function () {
    pins.A1.servoWrite(0)
})
input.buttonD1.onEvent(ButtonEvent.Click, function () {
    pins.A1.servoWrite(180)
})
feature=uf2
feature=buttond0
feature=buttond1
feature=pina1