3.4 Adding a Slide Switch
1. Now let’s attach a slide switch and use it to control the speed of flashes on the LED.
2. Attach the Slide Switch module to P0 on the edge of your Micobric motherboard next to the
LED module (note the 0 and 1 written in gold on the module).
3. Again, let’s draw a flow diagram before we write the program. Here is one for the program we
will write.
START
Turn on LED
Keep on for
200
milliseconds
Turn off LED
Keep off for
200
milliseconds
Is switch
on?
Turn on LED
Keep on for
2000
milliseconds
Turn off LED
Keep off for
2000
milliseconds
Yes
No
Содержание Versabot
Страница 1: ...The Versabot Manual July 2009...
Страница 23: ...Step 03 Step 04 Step 05...
Страница 24: ...Step 06 Step 07 Step 08...
Страница 25: ...Step 09 Step 10 Step 11...
Страница 26: ...Step 12 Step 13...