1711
|
1 esphome:
|
|
2 name: ride
|
|
3 platform: esp8266
|
|
4 # pin layout: https://cdn.evilmadscientist.com/catalog/kits/ada-huzzah/imglrg/2@2x.jpg
|
|
5 board: huzzah
|
|
6 build_path: build_ride
|
|
7
|
|
8 wifi:
|
|
9 ssid: !secret wifi_ssid
|
|
10 password: !secret wifi_password
|
|
11 use_address: 10.2.0.95
|
|
12 # MAC: 5c:cf:7f:01:58:8a
|
|
13
|
|
14 mqtt:
|
|
15 broker: "10.2.0.1"
|
|
16 port: 1883
|
|
17 username: ""
|
|
18 password: ""
|
|
19
|
|
20 logger:
|
|
21 baud_rate: 115200
|
|
22 level: DEBUG
|
|
23
|
|
24 ota:
|
|
25
|
|
26 # FAN8200 motor driver
|
|
27 # FAN8200 pins on the left
|
|
28 # -------------
|
|
29 # VCC - 3v
|
|
30 # CE1 - GPIO13
|
|
31 # OUT1 - MOTOR_BLK
|
|
32 # VS1 - n/c
|
|
33 # OUT2 - MOTOR_RED
|
|
34 # IN1 - GPIO12
|
|
35 # SGND - GND
|
|
36 #
|
|
37 # PGND - GND
|
|
38 # IN2 - n/c
|
|
39 # OUT4 - n/c
|
|
40 # VS2 - n/c
|
|
41 # OUT3 - n/c
|
|
42 # CE2 - n/c
|
|
43 # PGND - n/c
|
|
44
|
|
45 output:
|
|
46 - platform: esp8266_pwm
|
|
47 frequency: 500Hz
|
|
48 id: motor_pwm
|
|
49 pin: 13
|
|
50 switch:
|
|
51 - platform: gpio
|
|
52 id: motor_dir
|
|
53 name: "motor_dir"
|
|
54 pin: 12
|
|
55
|
|
56 light:
|
|
57 - platform: fastled_clockless
|
|
58 chipset: WS2812
|
|
59 pin: GPIO5
|
|
60 num_leds: 10
|
|
61 rgb_order: GRB
|
|
62 name: "rgb10"
|
|
63 default_transition_length: 200ms
|
|
64 - platform: monochromatic
|
|
65 name: "motor_speed"
|
|
66 output: motor_pwm
|
|
67 gamma_correct: 1.0
|
|
68 default_transition_length: 200ms
|
|
69 restore_mode: ALWAYS_OFF
|
|
70 # dir doesn't work- I'm not using the driver chip right. :(
|
|
71
|
|
72 # mosquitto_pub -t ride/light/motor_speed/command -m '{"state":"ON","brightness":255}'
|
|
73 # mosquitto_pub -t ride/light/motor_speed/command -m '{"state":"ON","brightness":0}'
|
|
74
|
|
75 # mosquitto_pub -t ride/light/rgb10/command -m '{"state":"ON","brightness":255,"color":{"r":100,"g":100,"b":200}}'
|
|
76 # mosquitto_pub -t ride/light/rgb10/command -m '{"state":"ON","brightness":255,"color":{"r":0,"g":0,"b":0}}'
|
|
77 # and see https://esphome.io/components/light/index.html?highlight=wle#wled-effect for per-led options.
|
|
78
|
|
79 # See /home/drewp/own/proj/mos/apps-1.19.6/ride/ for prev version with LED images. |