Change color temperature of a led strip based on the distance measured by a sonar. Go to the project home page on hackster to discover the details.
The project need pi-blaster daemon to be running. This guarantees us to send perfect PWM signals to our mosfets.
Install all the dependencies
npm install
and build the code
npm run build
Now you could launch the main script by typing:
sudo node lib/index.js
sudo is needed to send gpio commands.
Watch che video