//-----------------------------------------------------------
// Example using the Circuit Playground built-in light sensor
// Note: Light Sensor on Playground is hard coded by default to pin A5
//-----------------------------------------------------------

#include <Adafruit_CircuitPlayground.h>  //-- Circuit Playground Library

int analogValue;             //---- variable for storing sensor readings 
int scaledValue;             //---- for scaled value

void setup() {
  Serial.begin(9600);
  CircuitPlayground.begin();
}

void loop() {
  //--- Read sensor value, store it in "analogValue"
  analogValue = CircuitPlayground.lightSensor();
  //-- Uncomment the next 2 lines after you know the range (low-high) of your sensor
//  analogValue = map(analogValue, 0, 23, 0, 255);
//  constrain(scaledValue, 0, 255);


  Serial.println(analogValue); //-- Send sensor value to Serial port (USB) as ASCII
//  Serial.write(analogValue); //-- Send sensor value to Serial port (USB) as NUMBER
  delay(100);   // short delay
}
