Install Node.js
pyserial
paho-mqtt
numpy
run npm install
Download mosquitto from https://mosquitto.org/download/
In the "choose the protocol to use when listening section" add:
listener 1884
protocol mqtt
listener 9002
protocol websockets
Uncomment allow_anonymous and set to true as such:
allow_anonymous true
-
Run Local MQTT Server on one terminal window
Run mqtt server with config file
Unix/Linux Command:
/opt/homebrew/opt/mosquitto/sbin/mosquitto -c /opt/homebrew/etc/mosquitto/mosquitto.conf
Windows Command:
C:\PROGRA~1\mosquitto\mosquitto -v -c C:\PROGRA~1\mosquitto\mosquitto.conf\match addresses of mosquitto and mosquitto.conf with local addresses
-
Run main.py in separate terminal window
cd mqtt_gui
./main.py
[Make sure PCB is plugged in] -
Run Frontend in separate terminal window
cd mqtt_gui/frontend
npm start
Access GUI onlocalhost:3000
- Change conversion factor in config.json