Simulate analogWrite(PIN, 0-255) with digitalWrite

You can wire it up with Neopixels, my book
/raspberry-pi-projects-for-dummies
Shows you how.