Let’s get physical! Programming LEDs and Servos with your micro:bit
What's all this stuff?
Code for LED (light emitting diode)
When connecting LEDs to your micro:bit:
micro:bit LED setup
Full LED Board:
Single LED:
LED Challenge #1
Try changing this number to 700 and see what happens. What about 500? 200?
LED Challenge #2
Experiment with these two blocks: what is the difference between analog and digital?
LED Challenge #3: Make the light blink
LED Challenge #4
Have the LED turn ON when Button A is pushed and turn OFF when Button B is pushed.
Programming a servo to move!
Micro:bit and Servo Setup
You will need:
-1 Servo
-3 Pigtail alligator clips
What do the colors on the servo wires mean?
Black = Ground
Red = 3 V/Power
White = Pin #/Control Signal
1. Connect the pins to the servo
2. Connect the alligator clips to the micro:bit
-Black to ground
-Red to 3V
-White to Pin (does it matter which pin you connect it to?)
How to: micro:bit & servo
Now let’s create something!
Now let’s create something!
Use a servo and an LED!
Now let’s create something!
THANK YOU.