Example code for using the MAX7219 (SPI 7-segment display driver) with an ATmega168 and ESP8266
My progress on this code and the issues I worked through are documented here: http://www.mjblythe.com/hacks/2016/05/7-segment-driver/
The libraries that I'm using with the ATmega were provided with the kit that I bought ( http://www.nerdkits.com/ - looks like they don't sell kits anymore), but the idea should be easy to adapt to other libraries.
For the ESP8266, I'm using the Arduino IDE.