Converted to a module

Based on https://github.com/githubnemo/pi-blaster/blob/master/pi-blaster.c