The AtomS3R-M12 ESPHome integration includes startup sequencing, an inertial sensor, PSRAM, and the OV3660 camera component.
| Item | Information |
|---|---|
| Product | AtomS3R-M12 |
| SKU | C126-M12 |
| Main Functions | Camera, acceleration, gyroscope, and temperature data |
| Interfaces | I2C and camera parallel interface |
| ESPHome Components | bmi270_bmm150 (external), psram, esp32_camera |
| ESPHome Version | / |
After AtomS3R-M12 is powered on, GPIO18 must be pulled low before the hardware buses are initialized; otherwise, communication with the inertial sensor may fail. The following action runs at a high boot priority:
esphome:
name: atoms3r-m12
friendly_name: AtomS3R-M12
on_boot:
priority: 800
then:
- lambda: |-
gpio_set_direction(GPIO_NUM_18, GPIO_MODE_OUTPUT);
gpio_set_level(GPIO_NUM_18, 0);
vTaskDelay(pdMS_TO_TICKS(1500)); The camera frame buffer uses the official ESPHome PSRAM component:
psram:
mode: octal
speed: 80MHz ESPHome currently does not provide an official BMI270/BMM150 driver suitable for this device, so the community bmi270_bmm150 external component is used:
external_components:
- source: github://DennisGaida/m5stack-atoms3r-components@main
components: [bmi270_bmm150] The external platform provides three-axis acceleration, three-axis gyroscope, and temperature entities:
i2c:
- id: bmi270_i2c
sda: GPIO45
scl: GPIO0
sensor:
- platform: bmi270_bmm150
i2c_id: bmi270_i2c
address: 0x68
update_interval: 5s
acceleration_x:
name: "BMI270 Accel X"
acceleration_y:
name: "BMI270 Accel Y"
acceleration_z:
name: "BMI270 Accel Z"
gyroscope_x:
name: "BMI270 Gyro X"
gyroscope_y:
name: "BMI270 Gyro Y"
gyroscope_z:
name: "BMI270 Gyro Z"
temperature:
name: "BMI270 Temperature" The OV3660 uses the official ESPHome ESP32 Camera component:
i2c:
- id: camera_i2c
sda: GPIO12
scl: GPIO9
frequency: 100kHz
timeout: 10ms
esp32_camera:
name: "OV3660 Camera"
external_clock:
pin: GPIO21
frequency: 20MHz
i2c_id: camera_i2c
data_pins: [GPIO3, GPIO42, GPIO46, GPIO48, GPIO4, GPIO17, GPIO11, GPIO13]
vsync_pin: GPIO10
href_pin: GPIO14
pixel_clock_pin: GPIO40
resolution: 640X480
jpeg_quality: 10 See atoms3r-m12-example.yaml for the complete configuration. It includes the network, API, GPIO18 startup sequence, third-party inertial sensor, PSRAM, and camera settings.
Home Assistant during device setup:
After the device is added, the camera and inertial sensor entities are available:
Home Assistant Dashboard examples: