The tiny computers that live inside your every day stuff are called microcontrollers. Instead of having screens and keyboards and hard drives everything fits into one tiny circuit. Microcontrollers still have a processor, memory and different input/output systems. (Say hi to the micro controller inside your remote!)
What you'll need:
- scissors or craft knife
- brightly colored pencils
- scrap paper for more code
- a friend to be your computer.
Instructions
- Start by cutting out the remote control. Fold it in half.
- Cut out the pieces of code.
- Here's a few suggestions:
- Say "Woo!"
- Clap your hands
Jump up and down
Now write down your instructions. You can ask your parent to help you with writing.
Finally, slip your code into the remote.
Time to test! Have your friend be the computer. How fast can you tap different buttons before your friend gets confused? Now swap roles and instructions.
More things to do
Some microcontrollers don't need you to push a button in order to work. They have sensors that monitor the changes in the environment. Can you design a computer around the following sensors?
- Temperature. When the temperature gets hot, do this:
- Orientation. When the door is left open, do this:
- Vibration. When someone knocks on the door, do this:
- Moisture. When it rains do this:
- Internet. When there's a new toy in sale, do this:
Events
In computer science defining an action that causes something to happen is called an event. Every time you click with your mouse, type on the keyboard or push a button on the microwave, an event is triggered. This way we can gave traffic lights that don't need lunch breaks and AC machines that automatically turn off when it gets cold.