# Joulemetre Viewer ## Overview The Joulemetre Viewer is a web application designed to display real-time data read from a serial port. It visualizes key electrical parameters including power, voltage, current, energy, and time. The application utilizes WebSockets for live updates, ensuring that users receive the most current data without needing to refresh the page. ## Versions Node.JS version : 18.19.1 ## Project Structure ``` joulemetre-viewer ├── src │ ├── server │ │ ├── index.js # Entry point for the server, sets up Express and WebSocket communication │ │ └── serial.js # Manages serial port connection and data parsing │ ├── client │ │ ├── index.html # Main HTML file for the web application │ │ ├── app.js # Client-side JavaScript for WebSocket communication │ │ └── style.css # Styles for the web application │ └── shared │ └── types.js # Defines data structures for consistency between server and client ├── package.json # npm configuration file with dependencies and scripts └── README.md # Documentation for the project ``` ## Installation 1. Clone the repository: ``` git clone cd joulemetre-viewer ``` 2. Install the dependencies: ``` npm install ``` 3. Upload the .hex file in the arduino_hex folder to the arduino board. ## Usage 1. Start the server: ``` npm start ``` If you want to use another serial port (COM3 for example), the command is : ``` npm start COM3 ``` 2. Open your web browser and navigate to `http://localhost:3000` to view the application. #