start of firmware based on adafruit example