Project 18: Looking Inside The Fridge - Thames & Kosmos Code Gamer Experiment Manual

Coding workshop ? game with kosmobits
Table of Contents

Advertisement

PROJECT 18
Looking inside the fridge
How can you actually know if the light inside the fridge
really does go out when you close the refrigerator door?
You can't exactly check just by looking. You would have to
open the door, and then the light would just turn on again.
With your KosmoDuino, though, it's no problem at all!
YOU WILL NEED
› KosmoDuino in the interaction board
› Light sensor
› 4 Male-female jumper wires
PREPARATION
Remove one strand of 4 wires from the strand of male-
female jumper wires. Insert the plug ends into the socket
that you otherwise stick the KosmoBits sensor module
into.
Then, insert the light sensor into the socket ends of the
wires. Make sure that each of the light sensor pins is
connected via the jumper wire to exactly the right socket
into which it would normally be inserted. In other words,
the wires must not be allowed to cross.
CodeGamer manual inside english.indd 53
THE PLAN
You will be using the light sensor to measure the
brightness inside the fridge, and you will have the
NeoPixel light up on the interaction board in accordance
with the measured level of brightness.
But how can you have a display outside the fridge for the
brightness on the inside? Easy: You will use extension
wires to hook up the sensor! Then, you will be using the
wires to keep the sensor inside the fridge while
KosmoDuino and its interaction board remain on the
outside.
The wires are so thin that you will still be able to close the
refrigerator door!
CodeGamer
53
7/19/16 12:33 PM

Advertisement

Table of Contents
loading

Table of Contents