Skip to content

Latest commit

 

History

History
executable file
·
58 lines (49 loc) · 1.53 KB

Thermal Camera Unit (MLX90640).md

File metadata and controls

executable file
·
58 lines (49 loc) · 1.53 KB

Thermal Camera Unit (MLX90640)

https://shop.m5stack.com/products/thermal-camera

Under your "esphome" section of your yaml, you'll need to add some additional includes / libraries:

esphome:
  name: "espatom-thermalcamera"
  libraries:
    - FS
    - Wire
    - SPIFFS

Then you can add the main configuration for the unit:

external_components:
  - source:
      type: git
      url: https://github.com/chill-Division/M5Stack-ESPHome/
      ref: main
    components: camera_mlx90640

# This is neccessary to load the text_sensor library, can be left empty though
text_sensor:

# The Thermal Camera sensor itself
sensor:
camera_mlx90640:
  id: thermal_cam
  update_interval: 5s
  sda: 26  # I2C SDA PIN
  scl: 32  # 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"

web_server:
  port: 80

You can also browse to the device with the URL:

/thermal-camera

It will draw a bmp image (You'll need to zoom right in) of the heatmap the camera can see: image

Note: This is a BMP image if you save it directly