Dependancies
Pre-requisites
Buy the components
blinky-esphome-esp32s3.yaml
esphome:
name: blinky
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
framework:
type: arduino
version: 2.0.3
platform_version: 5.1.0
logger:
level: VERBOSE
baud_rate: 115200
deassert_rts_dtr: true
switch:
- platform: gpio
pin:
number: 5 # default LED on-board GPIO48, does not seem to work
mode: output
id: led
interval:
- interval: 2s
then:
- switch.toggle: led
- logger.log: "LED toggling"
YAML_FILE=blinky-esphome-esp32s3.yaml
UPLOAD_PORT?=/dev/cu.usbmodem14*
SERIAL_PORT?=/dev/cu.usbserial-14*
.PHONY: default compile upload log clean
default: clean compile upload
help: ## Show help message
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[$$()% 0-9a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
compile: ## Compile esphome
esphome compile $(YAML_FILE)
upload: ## Upload the firmware to the board
@echo "Ensure you plug in the board into the USB port"
esphome upload --device $(UPLOAD_PORT) $(YAML_FILE)
log: ## Start the logs
@echo "Ensure you plug in the board into the UART port"
esphome logs --device $(SERIAL_PORT) $(YAML_FILE)
clean: ## Remove all build files
rm -r .esphome
The default RGB LED on-board which is GPIO48
, does not seem to work with ESPHome. So, wireup a simple LED and resistor to GPIO5
pin on the board.
Compile firmware for this board
esphome compile blinky-esphome-esp32s3.yaml
Plug into the USB
port of the board and check the port address
$ ls /dev/cu.*
/dev/cu.Bluetooth-Incoming-Port /dev/cu.usbmodem14101
Upload the firmware
esphome upload --device /dev/cu.usbmodem14101 blinky-esphome-esp32s3.yaml
UART
port of the boardCheck the new port address
$ ls /dev/cu.*
/dev/cu.Bluetooth-Incoming-Port /dev/cu.SLAB_USBtoUART /dev/cu.usbserial-1410
Access the logs
esphome logs --device /dev/cu.usbserial-1410 blinky-esphome-esp32s3.yaml