4
4
external_components :
5
5
- source : github://slimcdk/esphome-custom-components
6
6
components : [tmc2209_hub, tmc2209, stepper]
7
- - source :
8
- type : local
9
- path : components/sensor/AS5048B
7
+ # - source:
8
+ # type: local
9
+ # path: components
10
10
11
11
esphome :
12
12
name : esp32stepper
13
13
project :
14
14
name : nerdyscout.esp32stepper
15
- version : " 1.0 "
15
+ version : " 1.1 "
16
16
platformio_options :
17
17
board_build.flash_mode : dio
18
18
upload_speed : 921600
@@ -81,40 +81,48 @@ logger:
81
81
# level: DEBUG
82
82
83
83
i2c :
84
- sda : GPIO45
85
- scl : GPIO38
84
+ sda : GPIO46
85
+ scl : GPIO45
86
86
scan : true
87
87
# id: bus_a
88
88
89
89
uart :
90
- tx_pin : GPIO43
91
- rx_pin : GPIO44
92
- baud_rate : 115200
93
- # id: serial
90
+ - id : serial_extern
91
+ tx_pin : GPIO43
92
+ rx_pin : GPIO44
93
+ baud_rate : 115200
94
+ - id : serial_stepper
95
+ tx_pin : GPIO17
96
+ rx_pin : GPIO18
97
+ baud_rate : 115200
98
+
99
+ tmc2209_hub :
100
+ id : tmc_hub
101
+ uart_id : serial_stepper
94
102
95
103
output :
96
104
- platform : gpio
97
- pin : GPIO14
105
+ pin : GPIO21
98
106
id : MS1_pin
99
107
- platform : gpio
100
108
pin : GPIO13
101
109
id : MS2_pin
102
110
103
111
- platform : gpio
104
- pin : GPIO48
112
+ pin : GPIO14
105
113
id : CFG1_pin
106
114
- platform : gpio
107
- pin : GPIO07
115
+ pin : GPIO12
108
116
id : CFG2_pin
109
117
- platform : gpio
110
- pin : GPIO47
118
+ pin : GPIO11
111
119
id : CFG3_pin
112
120
113
121
light :
114
122
- platform : neopixelbus
115
123
type : GRB
116
124
variant : WS2812
117
- pin : GPIO46
125
+ pin : GPIO10
118
126
num_leds : 2
119
127
id : led_rgb
120
128
- platform : partition
@@ -133,16 +141,17 @@ light:
133
141
stepper :
134
142
- platform : tmc2209
135
143
id : driver
144
+ tmc2209_hub_id : tmc_hub
136
145
max_speed : 800 steps/s
137
146
acceleration : 1500 steps/s^2
138
147
deceleration : 1500 steps/s^2
139
148
rsense : 100 mOhm
140
149
vsense : False
141
150
enn_pin : GPIO09 # Enable not input pin for the driver.
142
- diag_pin : GPIO12 # Error signaling from the driver.
143
- index_pin : GPIO11 # Serves as stepping feedback from the internal step pulse generator
144
- # step_pin: GPIO10 # Provides stepping pulses to the driver.
145
- # dir_pin: GPIO08 # Controls direction of the motor.
151
+ diag_pin : GPIO08 # Error signaling from the driver.
152
+ index_pin : GPIO07 # Serves as stepping feedback from the internal step pulse generator
153
+ step_pin : GPIO02 # Provides stepping pulses to the driver.
154
+ dir_pin : GPIO04 # Controls direction of the motor.
146
155
on_status :
147
156
- logger.log :
148
157
format : " Driver is reporting an update! (code %d)"
@@ -171,7 +180,7 @@ binary_sensor:
171
180
- platform : gpio
172
181
name : Button 1
173
182
pin :
174
- number : GPIO17
183
+ number : GPIO47
175
184
mode : INPUT
176
185
inverted : true
177
186
id : btn1
@@ -182,7 +191,7 @@ binary_sensor:
182
191
name : Button 2
183
192
id : btn2
184
193
pin :
185
- number : GPIO21
194
+ number : GPIO48
186
195
mode : INPUT
187
196
inverted : true
188
197
filters :
@@ -228,9 +237,9 @@ sensor:
228
237
229
238
- platform : rotary_encoder
230
239
name : " Rotary Encoder"
231
- pin_a : GPIO01
232
- pin_b : GPIO03
233
- pin_reset : GPIO02
240
+ pin_a : GPIO15
241
+ pin_b : GPIO16
242
+ pin_reset : GPIO03
234
243
id : rotary
235
244
# on_value:
236
245
# then:
0 commit comments