Robotics and coding

Save electricity!

If we save electricity we:

save nature
save money
help to save the world!

Lets build automated LED system that shuts down when we have enough light to work with.

Automatic lights

What do we need?

1 LED, 3 alligator clips, 1 resistor, 1 microbit, some coding.

Resistors job is to reduce current that our LED lasts for a
long time


1. Lets do connections.

You can follow teachers instructions or check connections from the screen:
Remember that LEDs long leg goes to + and short leg goes to ground!






2. Lets do the code



We still need to think good level for lighting to shut down LED

3. Lets find out what light level we have when lights in the classroom are ON and when lights are OFF

Example
  Light level
Light On 100
Lights Off 30

-> We will choose light level around 60