Sound and light activated code
(micro:bit V2)
Display bubbles if running, else:
advice to press button B
Flash the LED, more flash if running bubbles
Enable/disable light
detection
Press B to start bubbles, A to stop
If loud sound, run bubbles for 1 sec
See if a shadow appears above the
micro:bit, the shadow must be below the
ambient light in the room.
Control the motors and servo.
Set the proper topAngle and
bottomAngle for the servo to dip
the cup and raise up to fan level.
Select fan power (default is 150
out of 1023). More power is more
but smaller bubbles.
Default values
and measure
ambient light