Wokwi STM32 diagram.json

{
  "version": 1,
  "author": "Richard Kaiser, www.rkaiser.de, Embedded C++ books and trainings",
  "editor": "wokwi",
  "parts": [
    {
      "type": "board-st-nucleo-c031c6",
      "id": "nucleo",
      "top": 48.83,
      "left": -29.78,
      "attrs": {}
    },
    {
      "type": "wokwi-led",
      "id": "led1",
      "top": 178.8,
      "left": 349.8,
      "attrs": { "color": "red", "flip": "1" }
    },
    {
      "type": "wokwi-resistor",
      "id": "r1",
      "top": 263.45,
      "left": 257.8,
      "rotate": 180,
      "attrs": { "value": "220" }
    },
    {
      "type": "wokwi-led",
      "id": "led2",
      "top": 313.2,
      "left": 349.8,
      "attrs": { "color": "green", "flip": "1" }
    },
    {
      "type": "wokwi-led",
      "id": "led3",
      "top": 265.2,
      "left": 349.8,
      "attrs": { "color": "yellow", "flip": "1" }
    },
    {
      "type": "wokwi-resistor",
      "id": "r2",
      "top": 349.55,
      "left": 249.6,
      "attrs": { "value": "1000" }
    },
    {
      "type": "wokwi-resistor",
      "id": "r3",
      "top": 311.15,
      "left": 249.6,
      "attrs": { "value": "1000" }
    },
    { "type": "wokwi-potentiometer", "id": "pot1", "top": 104.3, "left": -125, "attrs": {} },
    {
      "type": "wokwi-hc-sr04",
      "id": "ultrasonic1",
      "top": -8.1,
      "left": 235.9,
      "attrs": { "distance": "66" }
    },
    {
      "type": "wokwi-pushbutton",
      "id": "btn1",
      "top": 140.6,
      "left": 412.8,
      "attrs": { "color": "green" }
    }
  ],
  "connections": [
    [ "$serialMonitor:TX", "nucleo:PA3", "", [] ],
    [ "$serialMonitor:RX", "nucleo:PA2", "", [] ],
    [ "r1:1", "led1:A", "red", [ "v0.3", "h8.2" ] ],
    [ "nucleo:D4", "r3:1", "yellow", [ "h36.05", "v9.6" ] ],
    [ "r3:2", "led3:A", "yellow", [ "h18", "v-9.6", "h38.4" ] ],
    [ "r2:2", "led2:A", "green", [ "v0" ] ],
    [ "pot1:GND", "nucleo:GND.5", "black", [ "v86.4", "h105.15" ] ],
    [ "pot1:VCC", "nucleo:3V3.2", "red", [ "v67.2", "h95.2" ] ],
    [ "pot1:SIG", "nucleo:A0", "green", [ "v124.8", "h95.6" ] ],
    [ "nucleo:GND.7", "led1:C", "black", [ "h150.95", "v0", "h0.4" ] ],
    [ "nucleo:GND.7", "led3:C", "black", [ "h160.55", "v48" ] ],
    [ "nucleo:GND.7", "led2:C", "black", [ "h170.15", "v96" ] ],
    [ "nucleo:D2", "r1:2", "red", [ "h55.25", "v-57.6" ] ],
    [ "nucleo:D5", "r2:1", "green", [ "h45.65", "v57.6" ] ],
    [ "nucleo:5V.2", "ultrasonic1:VCC", "red", [ "h29.25", "v-105.6", "h278.4" ] ],
    [ "ultrasonic1:GND", "nucleo:GND.9", "black", [ "v115.2", "h-142.85" ] ],
    [ "ultrasonic1:TRIG", "nucleo:D13", "orange", [ "v124.8", "h-122.85" ] ],
    [ "ultrasonic1:ECHO", "nucleo:D12", "gold", [ "v134.4", "h-125.6" ] ],
    [ "nucleo:GND.7", "btn1:2.r", "black", [ "h256.55", "v-9.6" ] ],
    [ "nucleo:D14", "btn1:1.l", "blue", [ "h170.45", "v-28.8" ] ]
  ],
  "dependencies": {}
}