INTRODUCTION_ Micro_bit
INTRODUCTION_ Micro_bit
MATERIALS •
•
USB to micro-USB cord
USB flash drive
LIST •
•
External battery pack
AAA batteries (2)
• Notebook
01 Get to know
the Micro:bit
microcontroller
board.
INTRODUCTION
TO MICRO:BIT
The Micro:bit is one of many
types of microcontrollers—small
devices, similar to a mini
computer, used to control other
devices and machines.
The Top
The Bottom
Power and the
Micro:bit
You can power the micro:bit through the USB connector or
with batteries, depending what you want to do with it.
Using USB
The USB connection will provide the micro:bit with 5V (5 volts) of
power when you plug it into your computer. However, the micro:bit
needs only 3.3V, not 5V, and too much voltage would damage the
micro:bit. Therefore, it has a USB interface chip that converts this 5V
to the 3.3V that the micro:bit expects.
Using USB
When the micro:bit is plugged in via USB, you can use the 3V
connector on the edge connector to provide power to low-current
electronic devices, like external LEDs or speakers designed to work
with the micro:bit.
Using USB
The connection labeled GND is the ground or 0V power
connection. When you power your micro:bit, current flows out of the
3V connection, and it needs to return to the micro:bit in order to
complete the circuit—the GND connection is where the current
returns.
Using Batteries
Once you’ve programmed
your micro:bit, you may
want to move it
away from your computer,
in which case you’ll need
batteries. You
can use a AAA battery
pack, Simply plug the ends
of the battery pack wires
into
the 3V socket on the
underside of the micro:bit.
Using Batteries
A built-in switch is useful
because you can power the
micro:bit down without
unplugging the battery pack, a
task that can be a bit tricky.
Don’t use rechargeable AAA
batteries because their voltage
is generally too low to power a
micro:bit. These batteries can
also allow dangerously high
currents if the flow of electricity
is accidentally short-circuited. If
you want to use rechargeable
batteries, one option is a USB
battery backup.
Using Batteries
A built-in switch is useful
because you can power the
micro:bit down without
unplugging the battery pack, a
task that can be a bit tricky.
Don’t use rechargeable AAA
batteries because their voltage
is generally too low to power a
micro:bit. These batteries can
also allow dangerously high
currents if the flow of electricity
is accidentally short-circuited. If
you want to use rechargeable
batteries, one option is a USB
battery backup.
Connecting Electronics
with Input/Output Pins
One especially fun thing about the micro:bit is that you
can use the connections to attach electronic gadgetry
of your own creation. In this book, you’ll build projects
that use these connectors to control motors, lights, and
a loudspeaker. You’ll also use them as inputs to gather
data from sensors that measure light, sound, and
temperature.
Connecting Electronics
with Input/Output Pins
The 3V and GND connections are there to supply power.
The connections labeled 0, 1, and 2 are usually referred
to as input/output pins, and you’ll be attaching
electronics to these.
Connecting Electronics
with Input/Output Pins
The pins 0, 1, and 2 can be used for:
● Digital output—turning an external LED on and off
● Analog output—controlling the brightness of an LED
● Pulse generation—to control a servo motor
● Digital input—to detect when an external button has been pressed
● Analog input—to measure temperature using an analog temperature
sensor
● Touch input—to detect that you have touched the pin or a wire
connected to a pin
Digital and Analog Inputs
There are a few things you’ll need for nearly all the
experiments and projects in this book. They include:
HARDWARE ESSENTIALS
Micro:bit
HARDWARE ESSENTIALS