Skip to content
RoboLearn
Not completed

Cameras as sensors

SensorsIntermediate20 minBefore this: What is a sensor?

What you’ll learn

  • The range of “seeing” sensors, from simple to advanced
  • What each can do and which boards they need

Colour sensors

Modules like the TCS34725 measure the red, green and blue light reflected from a surface close by. Great for sorting coloured blocks or spotting a coloured zone on a competition mat.

Smart camera modules

Pixy2 and HuskyLens contain a camera and their own processor. They do the vision work themselves (colour tracking, line tracking, face or tag recognition) and send simple results over I²C, UART or SPI: “red object at x = 140, y = 90”. An Arduino can use them easily.

Camera boards

  • ESP32-CAM: a cheap ESP32 with a camera, good for streaming video over Wi-Fi or simple processing.
  • Raspberry Pi + camera: a full Linux computer that can run OpenCV and AI models for real computer vision (see Computer vision basics).

What a camera gives a robot

Task Simplest suitable sensor
Which colour is this block? Colour sensor
Follow a coloured ball Pixy2 / HuskyLens
Read a QR code or tag HuskyLens, or Pi + OpenCV
Recognise many object types Pi with an AI model

Finished this lesson?