Skip to content

Commit

Permalink
👷 (Wokwi): add MPU6050 scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
leon0399 committed Jul 19, 2024
1 parent bafbb39 commit 4ca0eb7
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch

build/
18 changes: 18 additions & 0 deletions examples/MPU6050/BasicReadings/diagram.uno.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
10 changes: 10 additions & 0 deletions examples/MPU6050/BasicReadings/scenario.yml
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 6 additions & 0 deletions examples/MPU6050/BasicReadings/wokwi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[wokwi]
version = 1
firmware = "./firmware.hex"
elf = "./firmware.elf"

gdbServerPort=3333
5 changes: 5 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ca0eb7

Please sign in to comment.