From 4ca0eb7378d34b2a22eba8d0ea575d1a0dc2b1f1 Mon Sep 17 00:00:00 2001 From: Leonid Meleshin Date: Fri, 19 Jul 2024 21:50:36 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20(Wokwi):=20add=20MPU6050=20scena?= =?UTF-8?q?rio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ .../MPU6050/BasicReadings/diagram.uno.json | 18 ++++++++++++++++++ examples/MPU6050/BasicReadings/scenario.yml | 10 ++++++++++ examples/MPU6050/BasicReadings/wokwi.toml | 6 ++++++ platformio.ini | 5 +++++ 5 files changed, 41 insertions(+) create mode 100644 examples/MPU6050/BasicReadings/diagram.uno.json create mode 100644 examples/MPU6050/BasicReadings/wokwi.toml diff --git a/.gitignore b/.gitignore index 89cc49c..d61f606 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ .vscode/c_cpp_properties.json .vscode/launch.json .vscode/ipch + +build/ \ No newline at end of file diff --git a/examples/MPU6050/BasicReadings/diagram.uno.json b/examples/MPU6050/BasicReadings/diagram.uno.json new file mode 100644 index 0000000..64cd041 --- /dev/null +++ b/examples/MPU6050/BasicReadings/diagram.uno.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "author": "Leonid Meleshin", + "editor": "wokwi", + "parts": [ + { "type": "wokwi-arduino-uno", "id": "uno", "top": 0.6, "left": -0.6, "attrs": {} }, + { + "type": "wokwi-mpu6050", + "id": "imu1", + "top": -131.42, + "left": 166.12, + "rotate": -90, + "attrs": {} + } + ], + "connections": [ [ "uno:A4.2", "imu1:SDA", "green", [ "v0" ] ], [ "uno:A5.2", "imu1:SCL", "green", [ "v0" ] ] ], + "dependencies": {} +} \ No newline at end of file diff --git a/examples/MPU6050/BasicReadings/scenario.yml b/examples/MPU6050/BasicReadings/scenario.yml index e69de29..fc05c36 100644 --- a/examples/MPU6050/BasicReadings/scenario.yml +++ b/examples/MPU6050/BasicReadings/scenario.yml @@ -0,0 +1,10 @@ +name: Test MPU6050/BasicReadings +version: 1 +author: Leonid Meleshin + +steps: + - wait-serial: "MPU6050 Found!" + + - wait-serial: "Accelerometer X: 0.00 Y: 0.00 Z: 1.00" + - wait-serial: "Gyroscope X: 0.00 Y: 0.00 Z: 0.00" + - wait-serial: "Temperature: 24.00 C" diff --git a/examples/MPU6050/BasicReadings/wokwi.toml b/examples/MPU6050/BasicReadings/wokwi.toml new file mode 100644 index 0000000..7992cb5 --- /dev/null +++ b/examples/MPU6050/BasicReadings/wokwi.toml @@ -0,0 +1,6 @@ +[wokwi] +version = 1 +firmware = "./firmware.hex" +elf = "./firmware.elf" + +gdbServerPort=3333 \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 4b30716..6666069 100644 --- a/platformio.ini +++ b/platformio.ini @@ -8,6 +8,11 @@ ; Please visit documentation for the other options and examples ; https://docs.platformio.org/page/projectconf.html +[env:arduino_uno] +platform = atmelavr +board = uno +framework = arduino + [env:esp32dev] platform = espressif32 board = esp32dev