This tutorial introduces how to integrate AtomS3R-M12 into Home Assistant.

This tutorial uses ESPHome 2025.12.5 to compile and upload firmware. If you encounter compilation/upload issues, please consider switching the ESPHome version.
Click the button below to flash the firmware with one click. Follow the on-screen instructions to complete the configuration and quickly experience AtomS3R-M12 integration with Home Assistant.
CONTINUE.
New Device Setup.
NEXT.
ESP32-S3.
SKIP.
EDIT, we can customize device functions through the YAML file.
The following is the core part of the code. Related references and instructions are provided below.
Add on_boot component:
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)); Add PSRAM component:
psram:
mode: octal
speed: 80MHz Add External Components component:
external_components:
- source: github://DennisGaida/m5stack-atoms3r-components/components@main
components: [bmi270_bmm150] Add I2C component:
i2c:
- id: BMI270_150
sda: GPIO45
scl: GPIO0
- id: camera_i2c
sda: GPIO12
scl: GPIO9
frequency: 100kHz
timeout: 10ms Add Sensor component:
sensor:
- platform: bmi270_bmm150
i2c_id: BMI270_150
address: 0x68
update_interval: 3s
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" Add ESP32 Camera component:
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 SAVE and INSTALL in the upper-right corner, then select Manual Download in the pop-up window.
Factory format(Previously Modern).
CONNECT to connect to the device.
INSTALL.
Settings -> Device & services to check the device.
Discover section.
