The 'domoticz' sketch was derived from this example, which uses a 16 pixel addressable strip but can be set to any length.