If only your CPU could shout out at you and flash in blinking lights every time it's feeling stressed out. With the Bolt IoT Wi-Fi module, now it can! :D
For it is now time that we all finally acknowledge, there is not just Rage Against the Machine, there is much Rage IN the machine too O.o
The hardware connections are quite straightforward if you've already gone through the steps in the Quickstart guide to set up the Bolt device.
https://cloud.boltiot.com/docs
There are two LEDs which we use in the project. The Green LED is on if the CPU load is less than the threshold. Once the CPU load goes above the threshold, the Red LED comes on.
The Green LED is connected between digital pin 0 and GND.
The Red LED is connected between digital pins 1 and 2. When pin 1 is High and 2 is Low, the Red LED comes on. In order to switch it off, we toggle pin 1 to Low while 2 remains low.
Copy the API Key and the Bolt Device ID after setting up your Bolt IoT Cloud account from the dashboard. In case this is unclear, have a look at one of our previous posts like the one about a Crypto/Bitcoin Price Notification system
Other than that, run the Python script on your machine by running the below command on your PC or remote server and you're done!
python cpu_stress.py
And so, this is it! The easiest way to bridge the cyber with the physical world to let you know if your CPU is having a hard day.
Have a go at this project and in case you like our Stress-O-Meter, check us out on Indiegogo, back us, and spread the word! We have exclusive discounts for developers and the first batch of Bolts ships out in Februrary 2018 :)
Comments