   r = atoi(rChar);
   g = atoi(gChar);
   b = atoi(bChar);
-  r = 255;
-  g = 0;
-  b = 0;
- if(atoi(mode) == 1) activities();
- else setColorAndPattern(r, g, b, atoi(pattern));
-  
- Serial.println(r);
- Serial.println(g);
- Serial.println(b);
- 
-  
+
+  if(atoi(mode) == 1) activities();
+  else setColorAndPattern(r, g, b, atoi(pattern));
+
 }
 
 void setColorAndPattern(int r, int g, int b, int pattern){



void activities() {

  int last = atoi(very_active);
  setPixelColorByRange(0, last, 255,0,255);
  setPixelColorByRange(last, last+atoi(sendentary), 255,0,0);
  last+=atoi(sendentary);
  setPixelColorByRange(last, last+atoi(fairly_active), 255,255,0);
  last+=atoi(fairly_active);
  setPixelColorByRange(last, last+atoi(lightly_active), 0,255,255);
  last+=atoi(lightly_active);
  setPixelColorByRange(last, last+atoi(sleep_time), 255,155,0);
  strip.setBrightness(100);
  strip.show();
}

void setPixelColorByRange(int start, int _end, int r, int g, int b){
  for(uint16_t i=start; i<_end; i++) {
    strip.setPixelColor(i,strip.Color(r, g, b));  
  }
}


#include <HttpClient.h>
#include <math.h>

#define TIMECTL_MAXTICKS  4294967295L
#define TIMECTL_INIT      0
long time;
unsigned long flashTimeMark=0;
unsigned long flashTimeMark2=0;
long interval = 2000; 
long previousMillis = 0;
int alpha;
