   Wire.beginOnPins(L_SCL, L_SDA);
   Wire.beginTransmission(TSL2561_ADDRESS);
   if (!(writeByte(TSL_REG_CONTROL, 0b11) && // powerup
-        writeByte(TSL_REG_TIMING, 0b10) && // 402ms integration time. no gain
+        writeByte(TSL_REG_TIMING, 0b10 /* 402ms interval */ | 0x10 /* 16x gain */) &&
         writeByte(TSL_REG_INTERRUPT, 0))) { // no interrupts
         Serial.println("error in setup");
         Serial.println(getError());

// the loop routine runs over and over again forever:
void loop() {
  word uv,vis, ir;
  uv = analogRead(2);
  writeUv(uv);
  readData(vis, ir);
  Serial.println(uv);
  Serial.println(batt);
  Serial.println(vis);
  Serial.println(ir);
  
  writeVis(vis);
  writeIr(ir);
  batt++;
  writeBatt(batt);
  RFduinoBLE.advertisementData = advertisementData;
  RFduinoBLE.begin();
  Serial.println("hi");
  
  delay(1000);
  RFduinoBLE.end();
}

void writeUv(word val) {

 
  This example code is in the public domain.
 */
int LED = 1; 
int BATT = 6;
int UV_EN = 5;
int UV_VAL = 4;
int L_SCL = 2;
int L_SDA = 3;
int TSL2561_ADDRESS = 0b0111001;
int TSL2561_CMD = 0x80;
int TSL_2561_BLOCK = 0x10;
