Skip to content

Add camera support for Tab5 #82

@Semyonic

Description

@Semyonic

The M5Stack Tab5 has a built-in 12MP SC2356 camera (1600x1200) via MIPI-CSI interface, but there is currently no camera module available in UIFlow2 MicroPython firmware to access it.

Hardware

  • Device: M5Stack Tab5 (ESP32-P4)
  • Camera: SC2356 12MP via MIPI-CSI
  • Firmware: UIFlow2 v2.4.1

Current Behavior

import camera  # ImportError: no module named 'camera'

No camera-related modules are available in the Tab5 UIFlow2 firmware.

Expected Behavior

A camera module should be available for Tab5, similar to CoreS3:

import camera

camera.init(pixformat=camera.RGB565, framesize=camera.QVGA)
img = camera.snapshot()
jpg = img.to_jpeg(quality=80)

Use Case

I'm building a voice assistant with Module LLM that uses VLM (Vision Language Model) for image recognition. The VLM requires camera input:

# This works on CoreS3 but not Tab5
llm_0.vlm_setup(model='internvl2.5-1B-364-ax630c', ...)
llm_0.vlm_inference_img(work_id, camera_jpg_data, 'vlm_inference')
llm_0.vlm_inference(work_id, 'Describe this image', 'vlm_inference')

Without camera support, Tab5 cannot use VLM features with Module LLM.

Evidence Camera Works

The M5Tab5-UserDemo app demonstrates the camera working via ESP-IDF, proving the hardware and driver are functional. The camera driver just needs to be exposed to MicroPython.

Technical Context

  • ESP-IDF has SC2356 driver in esp-video-components
  • ESP32-P4 MIPI-CSI is supported in ESP-IDF v5.4+
  • MicroPython v1.27 added ESP32-P4 support
  • Camera module exists for CoreS3 (DVP interface) but not Tab5 (MIPI-CSI)

This would enable Tab5 to fully utilize Module LLM's VLM capabilities, making it a powerful edge AI device for vision + language tasks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions