Arduino UNO R4 WiFi firmware and a SwiftUI companion app for streaming MPU6050 accelerometer telemetry over UDP.
- PlatformIO firmware for the Arduino UNO R4 WiFi.
- UDP discovery and listener subscription support on port
12345. - MPU6050 calibration and accelerometer streaming in
t,ax,ay, andazfields. - SwiftUI app for discovery, subscription, live charting, and 3D acceleration viewing.
- Python/typing requirements for local helper tooling.
- Arduino UNO R4 WiFi
- MPU6050 accelerometer module
- A Wi-Fi network shared by the Arduino and the companion app device
-
Install PlatformIO.
-
Copy the Wi-Fi template and fill in your local credentials:
cp src/wifi_secrets.example.h src/wifi_secrets.h
-
Build the firmware:
pio run
-
Upload to the Arduino:
pio run --target upload
-
Open the serial monitor if you want to watch connection, discovery, and telemetry logs:
pio device monitor
Open src/ArduinoGUI/ArduinoGUI.xcodeproj in Xcode, then run the ArduinoGUI scheme on macOS or iOS.
The app can discover Arduino broadcasts on UDP 12345, subscribe with listen:12345, and plot incoming accelerometer packets.
The Arduino broadcasts discovery packets like:
arduino:ip:192.168.1.50,port:12345,listeners:1
Telemetry packets look like:
t:1.20,ax:0.012,ay:-0.004,az:0.981
src/wifi_secrets.h is intentionally ignored so real Wi-Fi credentials stay local. Use src/wifi_secrets.example.h as the starting point for your own copy.