A professional voting results system with desktop serial monitoring and mobile access. The desktop dashboard connects to your serial device and broadcasts results to mobile devices via WebSocket.
- Desktop Dashboard: Web Serial connection to your voting device
- Mobile Interface: Real-time results accessible from any mobile device
- Live Updates: WebSocket broadcasting for instant mobile updates
- Manual Testing: Demo mode and manual input for testing
npm installnpm startThe server will show your local IP address for mobile access.
- Open
index.htmlin Chrome/Edge - Connect to your serial device (e.g., COM3 at 115200 baud)
- Send lines like:
P1=085,p2=086
- Connect your mobile device to the same WiFi network
- Open browser and go to:
http://[YOUR_IP]:3000 - Results update automatically via WebSocket
- Desktop: Chrome/Edge with Web Serial API support
- Mobile: Any modern mobile browser (iOS Safari, Chrome Mobile, etc.)
- Network: Both devices on same WiFi network
- Serial Device: Sending ASCII lines ending with
\n
Expected serial output (case-insensitive):
P1=085,p2=086
p1=85,P2=86
index.html- Desktop dashboard with serial connectionmobile.html- Mobile-optimized interfaceserver.js- HTTP/WebSocket server for broadcastingstyles.css- Professional stylingscript.js- Serial parsing and UI logicpackage.json- Server dependencies
- No COM port: Close Arduino IDE and other serial apps
- Permission denied: Grant serial access when prompted
- Web Serial not supported: Use Firefox/Safari fallback (manual input only)
- Can't connect: Check both devices are on same WiFi
- No updates: Verify server is running (
npm start) - Wrong IP: Check server console output for correct IP address
- Firewall: Allow Node.js through Windows Firewall
- Port 3000: Ensure port 3000 is not blocked
- Router: Some routers block device-to-device communication
If you don't have a serial device:
- Open desktop dashboard
- Expand "Manual/Test Input"
- Use "Start Demo" for automatic updates
- Or manually enter:
P1=010,p2=008
This setup is for local network use only. The server accepts connections from any device on your network.