esp32-c3 beetle v1.0.0

This commit is contained in:
oskar 2025-10-31 17:45:18 +01:00
parent a9fd066107
commit 11091c1d9a
2 changed files with 86 additions and 63 deletions

74
86xx/led3xdrv-pro.yml Normal file
View file

@ -0,0 +1,74 @@
esphome:
name: led3xdrv
friendly_name: Led 3x
esp8266:
board: esp12e
logger:
api:
encryption:
key: "qHvgYr1RgkorYHuCq5kaolpW8Og8TUcV3YZH0KE8ndk="
ota:
- platform: esphome
password: "d1e7d153acd8591234576da1844f822f"
wifi:
ssid: "Lothlorien"
password: "LitwoOjczyznoMojaTysJestJakZdrowie"
web_server:
output:
- platform: esp8266_pwm
pin: GPI12
id: led_pwm01
frequency: 20000 Hz # 20 kHz bez pisku i bez migotania w kamerze
- platform: ledc
pin: GPI13
id: led_pwm02
frequency: 20000 Hz # 20 kHz bez pisku i bez migotania w kamerze
- platform: ledc
pin: GPIO14
id: led_pwm03
frequency: 20000 Hz # 20 kHz bez pisku i bez migotania w kamerze
light:
- platform: monochromatic
name: "LED PWM 1"
output: led_pwm01
gamma_correct: 1.0
- platform: monochromatic
name: "LED PWM 2"
output: led_pwm02
gamma_correct: 1.0
- platform: monochromatic
name: "LED PWM 3"
output: led_pwm03
gamma_correct: 1.0
sensor:
- platform: wifi_signal
name: "WiFi RSSI"
id: wifi_rssi
update_interval: 30s
- platform: uptime
name: "Uptime (s)"
id: uptime_s
update_interval: 60s
binary_sensor:
- platform: gpio
pin:
number: GPIO7
mode:
input: true
pullup: false
pulldown: true
name: "Czujnik ruchu SR505"
device_class: motion
filters:
- delayed_off: 2s

View file

@ -1,50 +1,41 @@
esphome: esphome:
name: oled-test name: led3xdrv
friendly_name: oled test friendly_name: Led 3x
esp32: esp32:
board: esp32-c3-devkitm-1 board: esp32-c3-devkitm-1
framework: variant: esp32c3
type: esp-idf
# Enable logging
logger: logger:
baud_rate: 0
# Enable Home Assistant API
api: api:
encryption: encryption:
key: "rNfuxXEaIvVuOHvYVdb4QpW8fezbbkKn3wvjkHdHGkY=" key: "naGRefDq/h5OWxKuRx+Wo7lJbgz9ynFkUajsMPrBrY4="
ota: ota:
- platform: esphome - platform: esphome
password: "5aa6ac416280761455b83922c266822b" password: "2fd6ea54e1209c9ce76a7d9392108b71"
wifi: wifi:
ssid: "Lothlorien" ssid: "Lothlorien"
password: "LitwoOjczyznoMojaTysJestJakZdrowie" password: "LitwoOjczyznoMojaTysJestJakZdrowie"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp32-C3-Oled-Test"
password: "Zto2fEEcWgnS"
captive_portal:
web_server: web_server:
output: output:
- platform: ledc - platform: ledc
pin: GPIO4 pin: GPIO4
id: led_pwm01 id: led_pwm01
frequency: 20000 Hz # 20 kHz bez pisku i bez migotania w kamerze frequency: 20000 Hz
- platform: ledc - platform: ledc
pin: GPIO3 pin: GPIO5
id: led_pwm02 id: led_pwm02
frequency: 20000 Hz # 20 kHz bez pisku i bez migotania w kamerze frequency: 20000 Hz
- platform: ledc - platform: ledc
pin: GPIO10 pin: GPIO6
id: led_pwm03 id: led_pwm03
frequency: 20000 Hz # 20 kHz bez pisku i bez migotania w kamerze frequency: 20000 Hz
light: light:
- platform: monochromatic - platform: monochromatic
@ -66,23 +57,6 @@ button:
- platform: safe_mode - platform: safe_mode
name: "Restart in Safe Mode" name: "Restart in Safe Mode"
i2c:
id: bus_oled
sda: GPIO5
scl: GPIO6
frequency: 100kHz
scan: true
# --- Czcionki do wyświetlacza (wygodne, ale możesz zmienić na swoje) ---
font:
- file: "fonts/Roboto-Regular.ttf"
id: f12
size: 8
- file: "fonts/Roboto-Bold.ttf"
id: f20
size: 11
# --- Przydatne sensory do pokazania na ekranie ---
sensor: sensor:
- platform: wifi_signal - platform: wifi_signal
name: "WiFi RSSI" name: "WiFi RSSI"
@ -94,16 +68,6 @@ sensor:
id: uptime_s id: uptime_s
update_interval: 60s update_interval: 60s
text_sensor:
- platform: wifi_info
ip_address:
name: "IP"
id: ip_addr
ssid:
name: "SSID"
id: wifi_ssid
# --- Przycisk BOOT (ten „użytkowy”; RESET/EN nie da się odczytać) ---
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
pin: pin:
@ -112,6 +76,7 @@ binary_sensor:
inverted: true inverted: true
name: "BOOT Button" name: "BOOT Button"
id: btn_boot id: btn_boot
- platform: gpio - platform: gpio
pin: pin:
number: GPIO7 number: GPIO7
@ -123,19 +88,3 @@ binary_sensor:
device_class: motion device_class: motion
filters: filters:
- delayed_off: 2s - delayed_off: 2s
# --- Wyświetlacz OLED ---
display:
- platform: ssd1306_i2c
model: "SSD1306 72x40"
address: 0x3C
rotation: 0
i2c_id: bus_oled # <- to jest kluczowe
lambda: |-
{
if (id(ip_addr).has_state()) {
it.printf(0, 0, id(f12), "ip:%s", id(ip_addr).state.c_str());
} else {
it.printf(0, 0, id(f12), "ip: (brak)");
}
}