Mainmenu #28

Merged
rhetenor merged 19 commits from mainmenu into main 2026-08-18 23:44:28 +02:00
2 changed files with 86 additions and 41 deletions
Showing only changes of commit ca4ea67e7b - Show all commits
+80 -35
View File
@@ -1,37 +1,82 @@
{ {
"version": 1, "version": 1,
"author": "CreatureDex", "author": "CreatureDex",
"editor": "wokwi", "editor": "wokwi",
"parts": [ "parts": [
{ {
"type": "board-esp32-s3-devkitc-1", "type": "board-esp32-s3-devkitc-1",
"id": "esp1", "id": "esp1",
"top": 67.2, "top": 67.2,
"left": -263.96, "left": -263.96,
"attrs": {} "attrs": {}
}, },
{ "type": "wokwi-ili9341", "id": "lcd1", "top": -191.24, "left": -0.38, "attrs": {} }, { "type": "wokwi-ili9341", "id": "lcd1", "top": -200.8, "left": 354.9, "attrs": {} },
{ {
"type": "wokwi-pushbutton", "type": "wokwi-pushbutton",
"id": "btn1", "id": "btn-up",
"top": 131, "top": -99.4,
"left": -124.8, "left": -76.8,
"attrs": { "color": "green", "xray": "1", "key": "1" } "attrs": { "color": "RebeccaPurple", "xray": "1", "key": "1", "label": "Up" }
} },
], {
"connections": [ "type": "wokwi-pushbutton",
[ "esp1:TX", "$serialMonitor:RX", "", [] ], "id": "btn-down",
[ "esp1:RX", "$serialMonitor:TX", "", [] ], "top": 25.4,
[ "lcd1:VCC", "esp1:3V3", "red", [ "v19.2", "h-57.6", "v-105.6", "h-124.95" ] ], "left": -76.8,
[ "lcd1:GND", "esp1:GND.2", "black", [ "v28.8", "h-76.8", "v-76.8" ] ], "attrs": { "color": "green", "xray": "1", "key": "1", "label": "Down" }
[ "lcd1:CS", "esp1:11", "orange", [ "v0" ] ], },
[ "lcd1:D/C", "esp1:12", "gold", [ "v0" ] ], {
[ "lcd1:RESET", "esp1:10", "brown", [ "v0" ] ], "type": "wokwi-pushbutton",
[ "lcd1:MOSI", "esp1:35", "violet", [ "v105.6", "h-124.8", "v-144" ] ], "id": "btn-left",
[ "lcd1:SCK", "esp1:36", "white", [ "v115.2", "h-144", "v-86.4" ] ], "top": -32.2,
[ "esp1:37", "lcd1:MISO", "magenta", [ "h57.6", "v105.6", "h172.8" ] ], "left": -163.2,
[ "btn1:1.l", "esp1:GND.2", "green", [ "h-9.6", "v-48" ] ], "attrs": { "color": "yellow", "xray": "1", "key": "1", "label": "Left" }
[ "btn1:2.l", "esp1:38", "green", [ "h-9.6", "v19.4" ] ] },
], {
"dependencies": {} "type": "wokwi-pushbutton",
"id": "btn-right",
"top": -32.2,
"left": 19.2,
"attrs": { "color": "red", "xray": "1", "key": "1", "label": "Right" }
},
{
"type": "wokwi-pushbutton",
"id": "btn-ok",
"top": -99.4,
"left": 115.2,
"attrs": { "color": "Magenta", "xray": "1", "key": "1", "label": "Ok" }
},
{
"type": "wokwi-pushbutton",
"id": "btn-back",
"top": 25.4,
"left": 115.2,
"attrs": { "color": "Lime", "xray": "1", "key": "1", "label": "Back" }
}
],
"connections": [
[ "esp1:TX", "$serialMonitor:RX", "", [] ],
[ "esp1:RX", "$serialMonitor:TX", "", [] ],
[ "lcd1:VCC", "esp1:3V3", "red", [ "v19.2", "h-57.6", "v-105.6", "h-124.95" ] ],
[ "lcd1:GND", "esp1:GND.2", "black", [ "v28.8", "h-76.8", "v-76.8" ] ],
[ "lcd1:CS", "esp1:11", "orange", [ "v0" ] ],
[ "lcd1:D/C", "esp1:12", "gold", [ "v0" ] ],
[ "lcd1:RESET", "esp1:10", "brown", [ "v0" ] ],
[ "lcd1:MOSI", "esp1:35", "violet", [ "v105.6", "h-124.8", "v-144" ] ],
[ "lcd1:SCK", "esp1:36", "white", [ "v115.2", "h-144", "v-86.4" ] ],
[ "esp1:37", "lcd1:MISO", "magenta", [ "h57.6", "v105.6", "h172.8" ] ],
[ "btn-up:2.l", "esp1:38", "purple", [ "h-9.6", "v19.4" ] ],
[ "btn-up:1.l", "esp1:GND.2", "black", [ "h0" ] ],
[ "btn-down:1.l", "esp1:GND.2", "black", [ "h0" ] ],
[ "btn-down:2.l", "esp1:39", "green", [ "h-19.2", "v115.4" ] ],
[ "btn-left:2.l", "esp1:40", "yellow", [ "h0", "v173" ] ],
[ "btn-left:1.l", "esp1:GND.2", "black", [ "h0" ] ],
[ "btn-right:2.l", "esp1:41", "red", [ "h-19.2", "v153.8" ] ],
[ "btn-right:1.l", "btn-left:1.r", "black", [ "h-96", "v28.8" ] ],
[ "btn-ok:2.l", "esp1:42", "Magenta", [ "h-19.2", "v211.58" ] ],
[ "btn-ok:1.l", "btn-up:1.r", "black", [ "h0" ] ],
[ "btn-back:1.l", "btn-down:1.r", "black", [ "h0" ] ],
[ "btn-back:2.l", "esp1:45", "Lime", [ "h-9.6", "v173" ] ]
],
"dependencies": {}
} }
+5 -5
View File
@@ -94,11 +94,11 @@ async fn main(spawner: Spawner) {
let button_config = InputConfig::default().with_pull(Pull::Up); let button_config = InputConfig::default().with_pull(Pull::Up);
let inputs = Inputs { let inputs = Inputs {
up: Input::new(peripherals.GPIO38, button_config.clone()), up: Input::new(peripherals.GPIO38, button_config.clone()),
down: Input::new(peripherals.GPIO0, button_config.clone()), down: Input::new(peripherals.GPIO39, button_config.clone()),
left: Input::new(peripherals.GPIO1, button_config.clone()), left: Input::new(peripherals.GPIO40, button_config.clone()),
right: Input::new(peripherals.GPIO2, button_config.clone()), right: Input::new(peripherals.GPIO41, button_config.clone()),
back: Input::new(peripherals.GPIO3, button_config.clone()), back: Input::new(peripherals.GPIO42, button_config.clone()),
ok: Input::new(peripherals.GPIO4, button_config.clone()), ok: Input::new(peripherals.GPIO45, button_config.clone()),
}; };
spawner.spawn(navigation::run(inputs, display).expect("run task failed")); spawner.spawn(navigation::run(inputs, display).expect("run task failed"));