Skip to content

Commit

Permalink
mpsc channels work, refactors the messaging for indicator and boiler …
Browse files Browse the repository at this point in the history
…to use them
  • Loading branch information
bitbrain-za committed Dec 29, 2024
1 parent 1e21379 commit ec02ee3
Show file tree
Hide file tree
Showing 11 changed files with 248 additions and 528 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ embassy = [
]

[dependencies]
anyhow = "=1.0.94"
anyhow = "=1.0.95"
log = { version = "0.4", default-features = false }
esp-idf-svc = { version = "0.49", default-features = false }
pid-ctrl = "0.1.4"
esp-idf-sys = { version = "*", features = ["binstart"] }
esp-idf-hal = "*"
esp-idf-sys = { version = "0.35", features = ["binstart"] }
esp-idf-hal = "0.44"
ws2812-esp32-rmt-driver = { version = "0.10.0", features = [
"smart-leds-trait",
] }
Expand Down
209 changes: 113 additions & 96 deletions diagram.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@
{
"type": "wokwi-led",
"id": "led1",
"top": 140.4,
"left": -226.6,
"top": -147.6,
"left": 138.2,
"attrs": {
"color": "green"
}
},
{
"type": "wokwi-led",
"id": "led2",
"top": 140.4,
"left": -169,
"top": -147.6,
"left": 195.8,
"attrs": {
"color": "red"
}
},
{
"type": "wokwi-led",
"id": "led3",
"top": 140.4,
"left": -197.8,
"top": -147.6,
"left": 167,
"attrs": {
"color": "blue"
}
Expand Down Expand Up @@ -61,34 +61,13 @@
"type": "5kg"
}
},
{
"type": "wokwi-hc-sr04",
"id": "ultrasonic1",
"top": -152.1,
"left": 43.9,
"attrs": {}
},
{
"type": "wokwi-gnd",
"id": "gnd2",
"top": 96,
"left": 335.4,
"attrs": {}
},
{
"type": "wokwi-gnd",
"id": "gnd3",
"top": -48,
"left": 172.2,
"attrs": {}
},
{
"type": "wokwi-vcc",
"id": "vcc3",
"top": -124.04,
"left": 9.6,
"attrs": {}
},
{
"type": "wokwi-vcc",
"id": "vcc4",
Expand All @@ -99,15 +78,15 @@
{
"type": "wokwi-gnd",
"id": "gnd6",
"top": 230.4,
"left": 220.2,
"top": 240,
"left": 354.6,
"attrs": {}
},
{
"type": "wokwi-vcc",
"id": "vcc5",
"top": 221.56,
"left": 201.6,
"top": 192.76,
"left": 355.2,
"attrs": {}
},
{
Expand All @@ -120,8 +99,8 @@
{
"type": "wokwi-gnd",
"id": "gnd7",
"top": 259.2,
"left": -250.2,
"top": -86.4,
"left": 114.6,
"attrs": {}
},
{
Expand Down Expand Up @@ -188,12 +167,34 @@
{
"type": "wokwi-led-ring",
"id": "ring1",
"top": 158.76,
"left": 255.31,
"rotate": 90,
"top": 288.21,
"left": 212.14,
"rotate": 180,
"attrs": {
"pixels": "32"
}
},
{
"type": "wokwi-gnd",
"id": "gnd3",
"top": 288,
"left": -192.6,
"attrs": {}
},
{
"type": "wokwi-vcc",
"id": "vcc3",
"top": 221.56,
"left": -192,
"attrs": {}
},
{
"type": "wokwi-microsd-card",
"id": "sd1",
"top": 314.03,
"left": -136.67,
"rotate": 270,
"attrs": {}
}
],
"connections": [
Expand All @@ -209,30 +210,6 @@
"",
[]
],
[
"led1:A",
"esp:14",
"green",
[
"v0"
]
],
[
"led3:A",
"esp:13",
"green",
[
"v0"
]
],
[
"led2:A",
"esp:12",
"green",
[
"v0"
]
],
[
"esp:GND.4",
"gnd1:GND",
Expand All @@ -249,23 +226,6 @@
"v0"
]
],
[
"ultrasonic1:VCC",
"vcc3:VCC",
"red",
[
"v28.8",
"h-19.2"
]
],
[
"ultrasonic1:GND",
"gnd3:GND",
"black",
[
"v0"
]
],
[
"cell1:GND",
"gnd2:GND",
Expand Down Expand Up @@ -323,22 +283,6 @@
"h0"
]
],
[
"ultrasonic1:ECHO",
"esp:17",
"green",
[
"v0"
]
],
[
"esp:16",
"ultrasonic1:TRIG",
"green",
[
"h0"
]
],
[
"gnd4:GND",
"pot3:GND",
Expand Down Expand Up @@ -445,16 +389,17 @@
"ring1:VCC",
"red",
[
"v0"
"h-28.8",
"v67.2"
]
],
[
"ring1:DIN",
"esp:21",
"green",
[
"h-57.6",
"v-76.8"
"v-96",
"h-230.4"
]
],
[
Expand All @@ -465,6 +410,78 @@
"v124.8",
"h38.4"
]
],
[
"led1:A",
"esp:1",
"green",
[
"v0"
]
],
[
"led3:A",
"esp:2",
"green",
[
"v0"
]
],
[
"led2:A",
"esp:42",
"green",
[
"v0"
]
],
[
"sd1:GND",
"gnd3:GND",
"black",
[
"v0"
]
],
[
"sd1:VCC",
"vcc3:VCC",
"red",
[
"v0"
]
],
[
"sd1:CS",
"esp:10",
"green",
[
"v0"
]
],
[
"sd1:SCK",
"esp:12",
"green",
[
"v0"
]
],
[
"sd1:DI",
"esp:13",
"green",
[
"v0"
]
],
[
"esp:11",
"sd1:DO",
"green",
[
"h0"
]
]
],
"dependencies": {}
Expand Down
Loading

0 comments on commit ec02ee3

Please sign in to comment.