You can see it in action on youtube and find source code on github.

Please not that I’m using an ESP8266 plate which includes some resistors, so I don’t need to add it.
If you’re not using a plate, you’ll need to add them.