Skip to main content

Camera Modules

The CoCube firmware provides two camera modules:

  • cocube_sengo1
  • cocube_sengo2

Both connect over I2C. Once initialized, they occupy shared resources and switch cocube_module into camera mode.

Quick choice

  • Sengo1: better for basic vision tasks Color, blob, card, line, QR code, and ball detection
  • Sengo2: better for more advanced vision tasks AprilTag, deep learning, 20-class recognition, and motion detection

Shared characteristics

  • both require init() first
  • both require change_algo(...) before you call the matching read function
  • init() powers on the module and switches cocube_module into camera mode
  • both support color recognition, blob detection, line following, card recognition, face recognition, and QR code reading

Main differences

FeatureSengo1Sengo2
Color recognition
Blob detection
Line detection
Card recognition
Face recognition
QR code recognition
Ball detection
AprilTag
Deep learning classification
20-class object recognition
Motion detection

Continue reading

One important reminder

Camera APIs are usually tightly bound to the current algorithm.
If you do not switch to the correct algorithm first, the module throws an error directly instead of silently returning an empty result.

Also, after init(), the camera occupies shared resources, and the control path for the gripper and some peripherals changes as well.

So the safest order in the lessons is usually:

  1. init()
  2. change_algo(...)
  3. print the result first
  4. then map the result to actions