summaryrefslogtreecommitdiffstats
path: root/matrix.yaml
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-04-16 11:38:19 +0200
committerDennis Eriksen <d@ennis.no>2023-04-16 11:38:19 +0200
commitfaa09546ae9a5566d5fa814da6cc2ebe9ced806c (patch)
tree713c5ec79c7808341962d4e0953322b19d427e8f /matrix.yaml
parentprettyfying airgradient (diff)
downloadesphome-config-faa09546ae9a5566d5fa814da6cc2ebe9ced806c.tar.gz
adding config for m5stack atom
Diffstat (limited to 'matrix.yaml')
-rw-r--r--matrix.yaml106
1 files changed, 106 insertions, 0 deletions
diff --git a/matrix.yaml b/matrix.yaml
new file mode 100644
index 0000000..93db9a6
--- /dev/null
+++ b/matrix.yaml
@@ -0,0 +1,106 @@
+# M5 Atom Matrix Configuration for m5atom01 which is an M5Stack Atom Matrix
+# ESP32 Pico, 8x8 RGB LED Matrix (WS2812C), Infra-red LED,
+# MPU6886 Inertial Sensor - 6-axis attitude sensor with 3-axis gravity accelerometer and 3-axis gyroscope
+# NB: This configuration does not use Home Assistant (HA). It uses TotallyInformation's standard MQTT Schema for ESP devices.
+
+# Pins/GPIO
+ #
+ # === M5Stack Atom Matrix Specific ===
+ # @see https://github.com/m5stack/M5Stack/blob/31be29f3f743768778accb8d5f308583ba4d3d4c/src/utility/Config.h
+ # @see https://docs.m5stack.com/#/en/core/atom_matrix
+ # ------ Buttons ------
+ # BUTTON_PIN | 39 | Under LED's and on side - both are the same button
+ # ------ RGB LEDs PIN ------
+ # RGB_PIN | 27 | 8x8 matrix, WS2812C
+ # ------ Infra-Red LED PIN ------
+ # INFRA_PIN | 12 |
+ # -------- I2C ---------
+ # SDA | 25 |
+ # SCL | 21 |
+ #
+ # MPU6886 Inertial Sensor - I2C Address 0x68
+ #
+ # ---- Exposed Ports ----
+ # -- | 3V3 | 5-pin connector pin 1
+ # 19 | Tx | 5-pin connector pin 3
+ # 22 | Rx | 5-pin connector pin 2
+ # 23 | Neo | 5-pin connector pin 4 (Connected to 34 via 100ohm resistor?)
+ # 33 | Adc | 5-pin connector pin 5
+ #
+ # 21 | SCL | 4-pin connector pin 1
+ # 25 | SDA | 4-pin connector pin 2
+ # -- | 5V | 4-pin connector pin 3
+ # -- | Gnd | 4-pin connector pin 4
+ #
+ # -- | Gnd | Grove connector pin 1
+ # -- | 5V | Grove connector pin 2
+ # 26 | | Grove connector pin 3
+ # 32 | | Grove connector pin 4
+ #
+ # WARNING: When using FastLED lib, the recommended maximum brightness of RGB LED is 20
+#
+
+substitutions: # All have to be strings, the substitution process will convert them to the correct types
+ name: m5matrix
+ friendly_name: M5 Matrix
+ static_ip: 10.18.44.206
+
+
+packages: # These allow merging whereas global includes do not
+ board: !include boards/m5stack-atom.yaml
+ base: !include common/base.yaml
+
+
+# Define I2C interface
+i2c:
+ sda: 25
+ scl: 21
+ scan: true
+ #frequency: 200kHz
+
+# output:
+# - platform: ledc # 5x5 RGB Matrix (WS2812C)
+# pin: 27
+# id: matrix
+
+binary_sensor:
+ - platform: gpio # btn
+ id: button
+ pin:
+ number: 39
+ inverted: true
+ on_click:
+ then:
+ - if:
+ condition:
+ - light.is_on: matrix_light
+ then:
+ - light.turn_off: matrix_light
+ else:
+ - light.turn_on:
+ id: matrix_light
+ effect: rainbow
+# --- End of binary_sensor: --- #
+
+light:
+ - platform: fastled_clockless # 5x5 RGB Matrix (WS2812C)
+ name: "5x5 Matrix"
+ id: matrix_light
+ pin: 27
+ chipset: WS2812
+ num_leds: 25
+ color_correct: [50%, 50%, 50%] # The LED's on the Atom Matrix should not be run at full power
+ effects:
+ - pulse:
+ - strobe:
+ - addressable_rainbow:
+ name: rainbow
+ - random:
+ name: random
+ - addressable_random_twinkle:
+ name: twinkle
+ - addressable_fireworks:
+ name: fireworks
+# --- End of light: --- #
+
+# EOF