CPU Meter using NodeJS backend and view using NodeMCU 7 Segment LED
- On your linux server install
sysstat
package. (Refer)
sudo apt-get install sysstat
- Enable monitoring via,
sudo nano /etc/default/sysstat
set
ENABLED="true"
- Install
pm2
using
npm install -g pm2
- Install
cpu-meter
using
npm install --save
- Start
cpu-meter
pm2 start
- Take note of your IP Address (Remember to open port
9000
on your linux server)
-
Open the code via Arduino IDE (Refer)
-
Change the
WIFI_SSID
andWIFI_PASSWORD
-
Change the
CPU_METER_IP_ADDRESS
to your linux server's IP Address -
Import SevSeg package to IDE by downloading (SevSeg.zip)
-
Setup your Seven Segment and note down the digitPins from NodeMCU. (NodeMCU Pinout)
-
Upload your code to NodeMCU.
-
Done.
The following references were a tremendous help.
-
https://www.instructables.com/id/Controlling-7-Segment-LED-Display-Using-ESP8266-We/
-
https://www.circuitbasics.com/arduino-7-segment-display-tutorial/
-
https://mechatronicsblog.com/esp8266-nodemcu-pinout-for-arduino-ide/
-
https://circuits4you.com/2019/01/11/nodemcu-esp8266-arduino-json-parsing-example/