This MacOS/iOS application connects to the ADXL345 sensor through Websockets and offers a real-time visual representation of the sensor data. Users can view data for the splitter axis (x, y, z) or observe a combined view by summing the x, y, and z values.
The server-side implementation for the ADXL345 sensor using ESP32 can be found here.
- Real-time data visualization using Swift Charts.
- Option to view data for individual axes (x, y, z) or a combined line.
- Built with SwiftUI.
- Websocket support using Vapor WebSocketKit.
- MacOS or iOS device.
- ADXL345 sensor setup and running.
Sensor data is streamed in JSON format. Each data packet matches the following structure:
{
"timestamp": <UInt64>,
"axisX": <Double>,
"axisY": <Double>,
"axisZ": <Double>
}
-
Clone the repository:
git clone <repository_url>
-
Navigate to the project directory and open the
.xcodeproj
or.xcworkspace
file. -
Build and run the application on your desired MacOS or iOS device.
-
Ensure your ADXL345 sensor is set up correctly and connect to the application using the provided interface.
This software was created for personal use and emphasizes simplicity. It may not adhere to all best practices, but it aims to fulfill its purpose effectively.
- SwiftUI
- Swift Charts
- Vapor WebSocketKit
This project is open-source. Feel free to use, modify, and distribute as needed.