     }
     else if ( buttonPressed( EXIT_BUTTON , p ) )
     {
-      ledcWrite( TFT_BACKLIGHT_CHANNEL, 0 );
       tftClearScreen = true;
       tftState = normal;
     }

{
  const uint16_t BARS_BOTTOM      = 190;
  const uint16_t BARS_HEIGHT      = BARS_BOTTOM;
  const uint16_t BARS_BORDER      = 10;
  const uint16_t BARS_WIDTH       = 200 / 5; /* note: total width is 200 px */
  const float    HEIGHT_FACTOR    = BARS_HEIGHT / 100.0;

  button_t TFT_CLOCK_AREA
  {
    10, 205, 110, 30
  };

  button_t TFT_NETWORK_AREA
  {
    140, 205, 170, 30
  };

  button_t tempArea[numberOfFoundSensors];

  uint16_t channelColor565[NUMBER_OF_CHANNELS];

  if ( tftClearScreen )
  {
    tft.fillScreen( ILI9341_BLACK );
    drawButton( MENU_BUTTON, ILI9341_BLUE, 0 );
    tft.setTextColor( ILI9341_YELLOW, ILI9341_BLACK );
    tft.startWrite();
    for ( uint8_t thisSensor = 0; thisSensor < numberOfFoundSensors; thisSensor++ )
    {
      tempArea[thisSensor].x = 220;
      tempArea[thisSensor].y = 70 + thisSensor * 50;
      tempArea[thisSensor].w = TFT_BUTTON_WIDTH - 20;
      tempArea[thisSensor].h = 30;
      tft.writeFastHLine( tempArea[thisSensor].x, tempArea[thisSensor].y, tempArea[thisSensor].w, ILI9341_GREEN );
      tft.writeFastHLine( tempArea[thisSensor].x, tempArea[thisSensor].y + tempArea[thisSensor].h, tempArea[thisSensor].w, ILI9341_GREEN );
      tft.writeFastVLine( tempArea[thisSensor].x, tempArea[thisSensor].y, tempArea[thisSensor].h, ILI9341_GREEN );
      tft.writeFastVLine( tempArea[thisSensor].x + tempArea[thisSensor].w, tempArea[thisSensor].y, tempArea[thisSensor].h, ILI9341_GREEN );
    }
    tft.endWrite();
    for ( uint8_t thisSensor = 0; thisSensor < numberOfFoundSensors; thisSensor++ )
    {
      int16_t x, y;
      uint16_t w, h;
      tft.setTextSize( 0 );
      tft.getTextBounds( sensor[thisSensor].name, 0, 0, &x, &y, &w, &h);
      tft.setCursor( ( tempArea[thisSensor].x + tempArea[thisSensor].w / 2 ) - w / 2,
                     ( tempArea[thisSensor].y - 10 ) );
      tft.print( sensor[thisSensor].name );
    }
    tftClearScreen = false;
  }

  tft.startWrite();
  for ( uint8_t channelNumber = 0; channelNumber < NUMBER_OF_CHANNELS; channelNumber++ )
  {
    // redraw the top part of the bar
    tft.writeFillRect( channelNumber * BARS_WIDTH + BARS_BORDER,
                       BARS_BOTTOM - BARS_HEIGHT,
                       BARS_WIDTH - BARS_BORDER * 2,
                       BARS_HEIGHT - channel[channelNumber].currentPercentage * HEIGHT_FACTOR,
                       TFT_BACK_COLOR );
    /*
          //100% water mark
          tft.drawFastHLine( channelNumber * BARS_WIDTH + BARS_BORDER,
                             BARS_BOTTOM - BARS_HEIGHT - 1,
                             BARS_WIDTH - BARS_BORDER * 2,
                             tft.color565( r, g, b ) );
    */

    uint32_t color = strtol( &channel[channelNumber].color[1], NULL, 16 );
    channelColor565[channelNumber] = tft.color565( ( color & 0xFF0000 ) >> 16, ( color & 0x00FF00 ) >> 8, color & 0x0000FF  );

    // redraw the bottom part of the bar
    tft.writeFillRect( channelNumber * BARS_WIDTH + BARS_BORDER,
                       BARS_BOTTOM - channel[channelNumber].currentPercentage * HEIGHT_FACTOR,
                       BARS_WIDTH - BARS_BORDER * 2,
                       channel[channelNumber].currentPercentage * HEIGHT_FACTOR,
                       channelColor565[channelNumber]);
  }
  tft.endWrite();



void showMenu()
{
  static lightStatus_t currentLightStatus;

  if ( tftClearScreen )
  {
