Skip to content

Sample code and some instructions on how to drive ARGB LEDs using a Raspberry Pi

License

Notifications You must be signed in to change notification settings

sulkaharo/glucoled

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glucoled

Silly hack project that loads glucose data from Nightscout and changes the color of a LED fan inside a computer accordingly.

You should be able to use addressible LED fan to build this. ARGB leds use 5 volts and have a three-pin connector, where one pin is +5V, one is ground and one is a data pin used to send the color data to the LEDs digitally (vs the older 12 volt LEDs that have four pins, ground and a voltage pin for each color).

Installing

Instructions on how to install Node on a Pi Zero W can be found here: https://danidudas.medium.com/how-to-install-node-js-and-npm-on-raspberry-pi-zero-or-other-arm-v6-device-220d0392a426

apt-get update
apt-get install git
npm install rpi-ws281x
git clone https://github.com/sulkaharo/glucoled

Running the script:

sudo nodejs glucoled.js nightscouthost.herokuapp.com

How to run the script at boot https://raspberrypi-guide.github.io/programming/run-script-on-boot

Wiring

Soldering time!

IF wiring inside a computer, soldering a custom cable is relatively simple. Standard computer power supply units output 12 and 5 volt currencies and both the Pi and fans use 5 volts. I had a Molex fan adapter cable handly, so adapter the instructions from the above link and used the red/black wires from the Molex as the power supply. Pi expects to be powered from the USB port, so this adapter included a micro-USB cable soldered to the same 5 volts.

Notes

The board with cabling

Molex pinout

ARGB pinout

Fan showing low

About

Sample code and some instructions on how to drive ARGB LEDs using a Raspberry Pi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published