Skip to content
LessonItem 1 of 36

What a Microcontroller and the Arduino Uno Board Are

You are viewing a preview. Enroll to save your progress.

Look at the things around your school. The school bell that rings by itself at exactly 7:00, the water dispenser that stops filling when the gallon is empty, or the traffic light in front of the school gate. All of them are controlled by a tiny computer called a microcontroller.

A microcontroller: a tiny computer in one chip

A microcontroller is a single chip that contains a processor, memory, and pins to talk to the outside world. It has no screen or keyboard like a laptop. Its job is simple but important: read an input, process it with a program, then produce an output.

Example with an automatic school bell:

  1. Input: the clock in the circuit shows 7:00.
  2. Process: the program checks, "is it time for class to start?"
  3. Output: the bell rings for five seconds.

The Arduino Uno

The Arduino Uno is a learning board that uses the ATmega328P microcontroller running at 16 MHz. It is popular because it is cheap, easy to program, and has many example projects. The important parts you should know:

  • USB port: sends the program from the computer and also supplies 5 volts of power.
  • DC barrel jack: for an adapter or battery of 7 to 12 volts when you are not using USB.
  • Digital pins 0 to 13: can be inputs or outputs that only know two states, on (HIGH) or off (LOW). Pins marked ~ (3, 5, 6, 9, 10, 11) can control brightness.
  • Analog pins A0 to A5: for reading sensors whose values change gradually, for example a light sensor.
  • Power pins: 5V, 3.3V, and GND (ground, the negative side).
  • "L" LED: a small built-in light connected to pin 13.
  • Reset button: restarts the program from the beginning.

How do we program it?

An Arduino program is called a sketch and is written in a language similar to C++. We write it in the Arduino IDE, then upload it through the USB cable. If you do not have an Arduino board yet, do not worry: Tinkercad Circuits is a free simulator in the browser. There you can wire virtual components and run programs exactly as on a real board.

Remember the formula: input, process, output. Every project in this course, up to the final traffic light and alarm project, follows that pattern.