1
1
# ESP32 Plant Watering System
2
2
3
- A microcontroller-based system for automated plant watering with ESP32. Monitor soil moisture and control watering pump.
3
+ A microcontroller-based system for automated plant watering with ESP32. Monitor soil moisture and control the watering pump.
4
4
5
5
Built for [ LilyGO T-Display-S3] ( https://github.com/Xinyuan-LilyGO/T-Display-S3 ) ESP32-S3 development board
6
6
@@ -18,7 +18,6 @@ Built for [LilyGO T-Display-S3](https://github.com/Xinyuan-LilyGO/T-Display-S3)
18
18
- DHT11 Digital (Temperature/Humidity) → GPIO1
19
19
- Water Pump Relay → GPIO2
20
20
- Battery Voltage → GPIO4
21
- - Moisture Digital → GPIO10
22
21
- Moisture Analog → GPIO11
23
22
- Moisture Power → GPIO18
24
23
- Water Level Analog → GPIO12
@@ -29,7 +28,7 @@ Built for [LilyGO T-Display-S3](https://github.com/Xinyuan-LilyGO/T-Display-S3)
29
28
- ** Sensor Integration**
30
29
31
30
- DHT11 temperature/humidity monitoring
32
- - Capacitive soil moisture sensing
31
+ - Capacitive soil moisture sensing (analog)
33
32
- Water level detection
34
33
- Battery voltage monitoring
35
34
@@ -57,52 +56,44 @@ Built for [LilyGO T-Display-S3](https://github.com/Xinyuan-LilyGO/T-Display-S3)
57
56
58
57
The project uses several Rust crates to provide functionality:
59
58
60
- ## Async/Embedded Frameworks
59
+ ### Async/Embedded Frameworks
61
60
62
- These crates provide support for asynchronous programming models and embedded futures.
63
-
64
- - [ ` embassy ` ] ( https://crates.io/crates/embassy )
65
- - [ ` embassy-executor ` ] ( https://crates.io/crates/embassy-executor )
66
- - [ ` embassy-futures ` ] ( https://crates.io/crates/embassy-futures )
67
- - [ ` embassy-net ` ] ( https://crates.io/crates/embassy-net )
68
- - [ ` embassy-sync ` ] ( https://crates.io/crates/embassy-sync )
69
- - [ ` embassy-time ` ] ( https://crates.io/crates/embassy-time )
61
+ - [ embassy] ( https://crates.io/crates/embassy )
62
+ - [ embassy-executor] ( https://crates.io/crates/embassy-executor )
63
+ - [ embassy-futures] ( https://crates.io/crates/embassy-futures )
64
+ - [ embassy-net] ( https://crates.io/crates/embassy-net )
65
+ - [ embassy-sync] ( https://crates.io/crates/embassy-sync )
66
+ - [ embassy-time] ( https://crates.io/crates/embassy-time )
70
67
71
68
---
72
69
73
- ## Hardware Abstraction & Embedded I/O
74
-
75
- These crates are used to interact with embedded hardware and interfaces.
70
+ ### Hardware Abstraction & Embedded I/O
76
71
77
- - [ ` embedded-hal ` ] ( https://crates.io/crates/embedded-hal )
78
- - [ ` embedded-text ` ] ( https://crates.io/crates/embedded-text )
79
- - [ ` embedded-graphics ` ] ( https://crates.io/crates/embedded-graphics )
72
+ - [ embedded-hal] ( https://crates.io/crates/embedded-hal )
73
+ - [ embedded-text] ( https://crates.io/crates/embedded-text )
74
+ - [ embedded-graphics] ( https://crates.io/crates/embedded-graphics )
80
75
81
76
---
82
77
83
- ## Networking
84
-
85
- Crates for network communication and protocols.
78
+ ### Networking
86
79
87
- - [ ` rust-mqtt ` ] ( https://crates.io/crates/rust-mqtt )
88
- - [ ` esp-wifi ` ] ( https://crates.io/crates/esp-wifi )
80
+ - [ rust-mqtt] ( https://crates.io/crates/rust-mqtt )
81
+ - [ esp-wifi] ( https://crates.io/crates/esp-wifi )
89
82
90
83
---
91
84
92
- ## ESP32-Specific Crates
93
-
94
- Crates related to ESP32 platforms, Wi-Fi support, and memory management.
85
+ ### ESP32-Specific Crates
95
86
96
- - [ ` esp-alloc ` ] ( https://crates.io/crates/esp-alloc )
97
- - [ ` esp-backtrace ` ] ( https://crates.io/crates/esp-backtrace )
98
- - [ ` esp-hal ` ] ( https://crates.io/crates/esp-hal )
99
- - [ ` esp-hal-embassy ` ] ( https://crates.io/crates/esp-hal-embassy )
87
+ - [ esp-alloc] ( https://crates.io/crates/esp-alloc )
88
+ - [ esp-backtrace] ( https://crates.io/crates/esp-backtrace )
89
+ - [ esp-hal] ( https://crates.io/crates/esp-hal )
90
+ - [ esp-hal-embassy] ( https://crates.io/crates/esp-hal-embassy )
100
91
101
92
---
102
93
103
- ## Display
94
+ ### Display
104
95
105
- The project uses the built-in 1.9" ST7789 LCD display (170x320) on the T-Display-S3 with the following pins :
96
+ The built-in 1.9" ST7789 LCD display on the T-Display-S3 has the following pin configuration :
106
97
107
98
- Backlight: GPIO38
108
99
- CS: GPIO6
@@ -112,37 +103,25 @@ The project uses the built-in 1.9" ST7789 LCD display (170x320) on the T-Display
112
103
- RD: GPIO9
113
104
- Data pins: GPIO39-42, GPIO45-48
114
105
115
- - [ ` mipidsi ` ] ( https://crates.io/crates/mipidsi )
106
+ - [ mipidsi] ( https://crates.io/crates/mipidsi )
116
107
117
108
---
118
109
119
- ## Sensor Support
110
+ ### Serialization
120
111
121
- Crates for interfacing with sensors like DHT11.
122
-
123
- - [ ` embedded-dht-rs ` ] ( https://github.com/rust-dd/embedded-dht-rs )
112
+ - [ serde] ( https://crates.io/crates/serde )
113
+ - [ serde_json] ( https://crates.io/crates/serde_json )
124
114
125
115
---
126
116
127
- ## Serialization
128
-
129
- Crates for data serialization and deserialization.
117
+ ### Miscellaneous
130
118
131
- - [ ` serde ` ] ( https://crates.io/crates/serde )
132
- - [ ` serde_json ` ] ( https://crates.io/crates/serde_json )
133
-
134
- ---
135
-
136
- ## Miscellaneous
137
-
138
- Other supporting crates for various use cases.
139
-
140
- - [ ` heapless ` ] ( https://crates.io/crates/heapless )
141
- - [ ` static_cell ` ] ( https://crates.io/crates/static_cell )
142
- - [ ` rand_core ` ] ( https://crates.io/crates/rand_core )
143
- - [ ` defmt ` ] ( https://crates.io/crates/defmt )
144
- - [ ` defmt-rtt ` ] ( https://crates.io/crates/defmt-rtt )
145
- - and more...
119
+ - [ heapless] ( https://crates.io/crates/heapless )
120
+ - [ static_cell] ( https://crates.io/crates/static_cell )
121
+ - [ rand_core] ( https://crates.io/crates/rand_core )
122
+ - [ defmt] ( https://crates.io/crates/defmt )
123
+ - [ defmt-rtt] ( https://crates.io/crates/defmt-rtt )
124
+ - ...and others
146
125
147
126
---
148
127
@@ -159,17 +138,14 @@ cd esp32-homecontrol-no-std-rs
159
138
160
139
### 2. Install Rust and the necessary tools
161
140
162
- https://docs.esp-rs.org/book/introduction.html
141
+ See the [ ESP-RS book ] ( https://docs.esp-rs.org/book/introduction.html ) .
163
142
164
- Install espup
165
- https://github.com/esp-rs/espup
166
- and probe-rs
167
- https://github.com/probe-rs/probe-rs
143
+ Install espup: [ espup GitHub] ( https://github.com/esp-rs/espup )
144
+ Install probe-rs: [ probe-rs GitHub] ( https://github.com/probe-rs/probe-rs )
168
145
169
146
``` sh
170
147
espup install
171
148
. $HOME /export-esp.sh
172
-
173
149
```
174
150
175
151
---
@@ -185,7 +161,7 @@ cp .env.dist .env
185
161
186
162
## Usage
187
163
188
- To flash the firmware to your ESP32 device, use the following command :
164
+ To flash the firmware to your ESP32 device, run :
189
165
190
166
``` sh
191
167
cargo run --release
@@ -199,69 +175,49 @@ cargo run --release
199
175
200
176
- [ DHCP Wi-Fi Example with Embassy] ( https://github.com/esp-rs/esp-hal/blob/main/examples/src/bin/wifi_embassy_dhcp.rs )
201
177
202
- ---
203
-
204
178
### MQTT Communication
205
179
206
180
- [ MQTT Example] ( https://github.com/etiennetremel/esp32-home-sensor/blob/fff5f7ca4055e38ed5c296d0544fa8e61d855388/src/main.rs )
207
181
208
- ---
209
-
210
182
### Display Interfaces
211
183
212
184
- [ MIDISPI Example with Display] ( https://github.com/embassy-rs/embassy/blob/227e073fca97bcbcec42d9705e0a8ef19fc433b5/examples/rp/src/bin/spi_gc9a01.rs#L6 )
213
185
- [ Display Example via SPI] ( https://github.com/embassy-rs/embassy/blob/227e073fca97bcbcec42d9705e0a8ef19fc433b5/examples/rp/src/bin/spi_display.rs#L6 )
214
186
215
- ---
216
-
217
187
### Sensors
218
188
219
189
- [ DHT11 Sensor Integration Example] ( https://github.com/rust-dd/embedded-dht-rs )
220
190
- [ Moisture Sensor Example] ( https://github.com/nand-nor/plant-minder/blob/4bc70142a9ec11e860b5422deb9d85ad192bab66/pmindp-esp32-thread/src/sensor/probe_circuit.rs#L63 )
221
191
222
- ---
223
-
224
192
### UI & Graphics
225
193
226
194
- [ Icons and UI Example with Display & Publish] ( https://github.com/sambenko/esp32s3box-display-and-publish )
227
195
228
- ---
229
-
230
196
### Projects and Games
231
197
232
198
- [ Pacman Game Example] ( https://github.com/georgik/esp32-spooky-maze-game )
233
199
- [ Motion Sensors & Body Tracking Example] ( https://github.com/SlimeVR/SlimeVR-Rust/blob/9eff429f4f01c8b7c607f3c3988de82729c753b3/firmware/src/peripherals/esp32/esp32c3.rs#L38 )
234
200
235
- ---
236
-
237
201
### Networking
238
202
239
203
- [ Netstack & MQTT Struct Example] ( https://github.com/mirkomartn/esp32c3-embassy-poc/blob/9ad954dcba19897a973e3453fd83196829eee485/src/netstack.rs )
240
204
- [ HTTP Request Example with Embassy] ( https://github.com/embassy-rs/embassy/blob/86578acaa4d4dbed06ed4fcecec25884f6883e82/examples/rp/src/bin/wifi_webrequest.rs#L136 )
241
205
- [ NTP Socket Example] ( https://github.com/vpetrigo/sntpc/blob/2711f17d42b9a681ced02639780fe72cd8042b36/examples/smoltcp-request/src/main.rs )
242
206
243
- ---
244
-
245
207
### Miscellaneous Examples
246
208
247
209
- [ Joystick Analog Pin Input Example] ( https://github.com/WJKPK/rc-car/blob/f1ce37658c7b8b6cbc47c844243ea8b90d1e1483/pilot/src/main.rs )
248
210
- [ Battery Monitoring Example] ( https://github.com/longxiangam/work_timer/blob/788c0bee18ec47adce07e3ba71e884920e6473e1/src/battery.rs )
249
211
250
- ---
251
-
252
212
### Tutorials
253
213
254
214
- [ ESP32 Rust HAL Tutorials] ( https://blog.theembeddedrustacean.com/series/esp32c3-embedded-rust-hal )
255
215
256
- ---
257
-
258
216
### Advanced Examples
259
217
260
218
- [ Futures Example] ( https://github.com/kamo104/esp32-rust-mqtt-esp-now-gateway/blob/main/src/main.rs )
261
219
- [ Sleep, Display Layout, Logging, Dashboard, Multiple Tasks] ( https://github.com/claudiomattera/esp32c3-embassy/blob/master/esp32c3-embassy/src/sleep.rs )
262
220
263
- ---
264
-
265
221
### Bitcoin Device, USB, & OTA Updates
266
222
267
223
- [ Fancy Bitcoin Device with GUI Example] ( https://github.com/frostsnap/frostsnap/blob/0b2d589bcf8a0863e1067595aae8c9376cfb4867/device/src/graphics/animation.rs )
0 commit comments