   if (held != lastHeld) {
     lastHeld = held;
     if (!held) {
-      brightnessDelta = -brightnessDelta;
+      nightlight.released();
     }
   }
   

#include <Adafruit_NeoPixel.h>

#define PIXEL_PIN   13    // Digital IO pin connected to the NeoPixels.

#define PIXEL_COUNT 22

#define BUTTON_PIN  3

static const uint32_t WHITE = Adafruit_NeoPixel::Color(255, 255, 255);
static const uint32_t OFF = Adafruit_NeoPixel::Color(0, 0, 0);

class Tree
{
private:
  Adafruit_NeoPixel pixels;
  uint32_t target;
  uint8_t steps;
  
public:
  Tree(uint16_t count, uint8_t pin)
    : pixels(count, pin)
    , target(Adafruit_NeoPixel::Color(0, 0, 0))
    , steps(50)
  {
  }
  
  void setup()
  {
    pixels.begin();
    pixels.show();
  }
  
  void step()
  { 
    pixels.show();
  }
};

class Button
{

  const byte held = button.held();
  
  if (held) {
    if (on) {
      nightlight.held();
    } else {
      on = true;
      nightlight.reset();
    }
    for (int i = 0; i != pixels.numPixels(); ++i) {
      pixels.setPixelColor(i, nightlight.colour());
    }
    pixels.show();
  }
