Last active
May 26, 2024 04:14
-
-
Save Bazmundi/10bc18ca6c93203e5675629b2ef734d9 to your computer and use it in GitHub Desktop.
LilyGo TTGO T-Camera V1.6.2 yaml for ESPHome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: t_camv162 | |
platform: ESP32 | |
board: esp-wrover-kit | |
wifi: | |
ssid: "xxxx-xxxx" | |
password: "xxxxxxxx" | |
manual_ip: | |
static_ip: xxx.xxx.xxx.xxx | |
subnet: xxx.xxx.xxx.xxx | |
gateway: xxx.xxx.xxx.xxx | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: "xxxxxxxx" | |
password: "xxxxxxxx" | |
captive_portal: | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
ota: | |
binary_sensor: | |
- platform: gpio | |
pin: GPIO19 | |
name: PIR | |
id: movement | |
device_class: motion | |
- platform: gpio | |
pin: | |
number: GPIO15 | |
mode: INPUT_PULLUP | |
inverted: True | |
name: Button | |
- platform: status | |
name: Status | |
sensor: | |
- platform: wifi_signal | |
name: WiFi Signal | |
update_interval: 10s | |
- platform: uptime | |
name: Uptime | |
# If your board fails to start, I bet you probably have the same fragged display problem I have, with one | |
# of the two boards I bought. Hint, whenever ESPHome fails to start up, come back to your yaml file and | |
# cut it right back to basics. Then add lines back in until your ESPHome fails to start, then you found | |
# the culprit. | |
esp32_camera: | |
name: Camera | |
external_clock: | |
pin: GPIO4 | |
frequency: 20MHz | |
i2c_pins: | |
sda: GPIO18 | |
scl: GPIO23 | |
data_pins: [GPIO34, GPIO13, GPIO14, GPIO35, GPIO39, GPIO38, GPIO37, GPIO36] | |
vsync_pin: GPIO5 | |
href_pin: GPIO27 | |
pixel_clock_pin: GPIO25 | |
# power_down_pin: GPIO26 | |
resolution: 640x480 | |
jpeg_quality: 10 | |
# The following are set to true, since there is a plastic case for the t-camera which expects USB is at the bottom. | |
# Otherwise set both to false. | |
vertical_flip: true | |
horizontal_mirror: true | |
i2c: | |
sda: GPIO21 | |
scl: GPIO22 | |
# fonts need to be in a folder below that of this yaml file. You can grab free fonts off the Net. | |
font: | |
- file: "fonts/times-new-roman.ttf" | |
id: tnr1 | |
size: 20 | |
- file: "fonts/times-new-roman.ttf" | |
id: tnr2 | |
size: 35 | |
- file: "fonts/times-new-roman.ttf" | |
id: tnr3 | |
size: 70 | |
# On start your display will probably tell you its 1997 or some dang backward date. Don't sweat it as, | |
# NTP will come to the rescue. | |
time: | |
- platform: homeassistant | |
id: homeassistant_time | |
display: | |
- platform: ssd1306_i2c | |
model: "SSD1306 128x64" | |
address: 0x3C | |
# The following is set to 180, since there is a plastic case for the t-camera which expects USB is at the bottom. | |
# Otherwise comment it out. | |
rotation: 180 | |
lambda: |- | |
if(id(movement).state) { | |
it.print(64, 54, id(tnr3), TextAlign::BASELINE_CENTER, "Boo!"); | |
} else { | |
it.strftime(64, 0, id(tnr1), TextAlign::TOP_CENTER,"%d-%m-%Y", id(homeassistant_time).now()); | |
it.strftime(64, 64, id(tnr2), TextAlign::BASELINE_CENTER, "%H:%M", id(homeassistant_time).now()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm under the "Hi LeXin". And I'm having touble flashing anythin from espWeb or arduino ide, since it has no boot button and holding the RST does nothing. Is this normal? I'm not able to find anything else.