What is a microcontroller?

A tiny computer on one chip, built to sense and control things.

A tiny computer on one chip

A microcontroller packs a processor, memory and input/output connections into a single chip. It is built to do one job, such as reading a sensor and deciding what to switch on, rather than to run many different programs.

How it differs from a computer

Inputs and outputs

Most of the pins on a board can be used as inputs or outputs. Your program reads inputs and decides what to do with outputs.

Examples of inputs and outputs
Inputs (sensing)Outputs (acting)
A push buttonAn LED
A temperature sensorA buzzer
A light sensorA small motor, through a suitable driver
A potentiometer (a turning knob)A display

Digital and analog

A digital pin is either on or off (high or low). An analog input can read a range of values, such as how far a knob is turned.

Next: Arduino