Simulateur MicroPython Wokwi
WOKWI est un simulateur électronique en ligne opensource gratuit multi plateforme avec Arduino, ESP32, Raspberry Pi Pico et aussi multi langage avec Arduino et MicroPython. |
|
Exemple de simulation avec une LED, un bouton poussoir et une Raspberry Pi Pico sous MicroPython
Pour tester cet exemple, coller le code suivant dans main.py
from machine import Pin
|
et le code suivant dans diagram.json
{ "version": 1, "author": "GCworks", "editor": "wokwi", "parts": [ { "type": "wokwi-pi-pico", "id": "pico", "top": 0, "left": 0, "attrs": {} }, { "type": "wokwi-led", "id": "led1", "top": -2.67, "left": -113.75, "attrs": { "color": "red" } }, { "type": "wokwi-pushbutton", "id": "btn1", "top": 38.2, "left": 187.73, "attrs": { "color": "green" } }, { "type": "wokwi-resistor", "id": "r1", "top": 119.28, "left": 158.93, "rotate": 90, "attrs": { "value": "1000" } }, { "type": "wokwi-resistor", "id": "r2", "top": 37.53, "left": -84.25, "attrs": { "value": "330" } } ], "connections": [ [ "pico:GP0", "$serialMonitor:RX", "", [] ], [ "pico:GP1", "$serialMonitor:TX", "", [] ], [ "pico:GND.2", "led1:C", "black", [ "h0" ] ], [ "pico:3V3", "btn1:1.l", "red", [ "h0" ] ], [ "r1:1", "btn1:2.l", "gold", [ "h0" ] ], [ "r1:2", "pico:GND.5", "black", [ "h-2.12", "v47.97" ] ], [ "pico:GP20", "btn1:2.l", "gold", [ "h62.25", "v-48.49", "h-0.52", "v-28.46" ] ], [ "pico:GP5", "r2:2", "green", [ "h-15.69", "v-17.62" ] ], [ "r2:1", "led1:A", "green", [ "v0" ] ] ], "dependencies": {} } |
Créé avec HelpNDoc Personal Edition: Éditeur complet de livres électroniques ePub