40 lines
1012 B
Markdown
40 lines
1012 B
Markdown
# esphome
|
|
|
|
## esp32
|
|
|
|
[docs](https://esphome.io/guides/getting_started_command_line.html)
|
|
|
|
Just start with an existing yaml, such as base_esp32.yaml.
|
|
|
|
Plug it in to laptop, then run:
|
|
|
|
```sh
|
|
docker run --rm -v "${PWD}":/config --device=/dev/ttyUSB0 -it esphome/esphome base_esp32.yaml run
|
|
```
|
|
|
|
Then set static IP in router.
|
|
Then in [esphome on server](http://wildebeest:6052/) create same thing, add static IP block, then upload.
|
|
Should now be online.
|
|
|
|
## Hardware
|
|
|
|
### irf520
|
|
|
|
[pin-out](https://protosupplies.com/product/irf520-n-ch-mosfet-module/)
|
|
|
|
#### 1 x 3 Male Header
|
|
|
|
SIG = Signal input (active HIGH). Typically used with 5V logic. Can be driven at up to 10V to fully turn on the IRF520.
|
|
VCC = No connection
|
|
GND = Digital ground.
|
|
|
|
#### 1 x 2 Screw Terminal (Load)
|
|
|
|
V+ = Connect to positive lead of load (motor, LEDs, fan, etc)
|
|
V- = Connect to negative lead of load
|
|
|
|
#### 1 x 2 Screw Terminal (Power)
|
|
|
|
VIN = Connect to power supply (0-24V) being used to power the load
|
|
GND = Connect to power supply ground
|