esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
external_components:
- source:
type: git
url: https://github.com/chill-Division/M5Stack-ESPHome/
ref: main
components: camera_mlx90640
i2c:
- id: bus_a
sda: GPIO38
scl: GPIO39
scan: true
- id: grove
sda: GPIO1
scl: GPIO2
scan: true
camera_mlx90640:
id: thermal_cam
update_interval: 5s
sda: 1 # I2C SDA PIN
scl: 2 # I2C SCL PIN
frequency: 400000 # I2C Clock Frequency
address: 0x33 # MLX90640 Address
mintemp: 15 # Minimal temperature for color mapping
maxtemp: 40 # Maximal temperature for color mapping
refresh_rate: 0x04 # 0x05 For 16Hz or 0x04 for 8Hz
min_temperature:
name: "MLX90640 Min temp"
max_temperature:
name: "MLX90640 Max temp"
mean_temperature:
name: "MLX90640 Mean temp"
median_temperature:
name: "MLX90640 Median temperature"
I’ve swapped the yellow and grey wires in the grove cable to get SDA and SCL in the right positions. The I2C scan is showing a device with address 0x33 on GPIO1 and 2, with a frequency of 50000. (I’ve tried changing the frequency value, above from 400000 to 50000, but it makes no difference).
The log shows “[E] [MLX90640:206] The sensor is not connected”
The first thing I needed to do was swap a couple of pins on the grove connector. You’ll noticed that the pins on the AtomS3 Lite are not in the standard order. From memory the yellow and white need to be swapped at one end of the cable.
Here’s the code I’m using. I didn’t fully clean up once I got it working, so there might be some elements there you don’t want or need:
Mine’s been working reliably since December. I have it over a lizard enclosure, managing two heat lamps on Shelly dimmers, placed at one end of the enclosure. Every 5 minutes it checks the temperature and adjusts the heat lamps up or down to maintain the correct maximum temperature.
Ok interesting, I have tried your setup and swapped the pins (This can be done in the yaml by simply changing the sda and scl pin assignment, does not need to be a physical swap)
However i am getting a constant issue with any device i run this on it seems to trigger the ‘watchdog’
[14:18:26]E (17058) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[14:18:26]E (17058) task_wdt: - loopTask (CPU 1)
[14:18:26]E (17058) task_wdt: Tasks currently running:
[14:18:26]E (17058) task_wdt: CPU 0: IDLE
[14:18:26]E (17058) task_wdt: CPU 1: loopTask
[14:18:26]E (17058) task_wdt: Aborting.
Any device? So the S3 Lite works on its own, but gets the above error as soon as a device is connected? I don’t believe I’ve seen a Task Watchdog message. Sorry I can’t be more help.
Good to know. After failing with the Atom S3 (the camera was detected, but not responding) I wasn’t going to take any chances.