micro:bit Automation Lab
Lights, Motors, Sensors
Micro:bit Automation Lab
Test your ideas for automation with the micro:bit programmable computer and electronic devices - lights, speakers, and motors
The DFRobot Motor Expansion Board
Connecting micro:bit to Motor Board
As Shown ->
Connecting micro:bit to Motor Board
1
2
Infrared (IR) Proximity Sensor
Transmit
Detect
Surface
3V
GND
P0-2
Sensitivity
IR Proximity Sensor - Connecting to Board
Each I/O Pin Row has 3 Pins:��GND
Ground / - (Neg) / 0V
3V3
Regulated Power / + (Pos) / 3.3V
P
Programmable Pin�Digital Mode: On / Off or 0 / 3.3V
Analog Mode: 0 - 3.3V range
IR Proximity Sensor - Connecting to Board
Out - P0-16 (Green)
VCC -> 3v3
Gnd -> Gnd
Out -> P0-16
VCC - 3v3 (red)
Gnd (Black)
Programming IR Sensor
Connected to P8
Programming IR Sensor
Connected to P8
Programming IR Sensor
Connected to P8
Programming IR Sensor
Observations / Debugging
Programming IR Sensor
Connected to P8
Programming IR Sensor
Connected to P8
Setting the pin (P8) to a Pull-Up pin changes its behavior and makes the digital read more dependable
Programming IR Sensor
Challenge
General Code Pattern