const int sensor = A0;

float luminosidade;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);

  pinMode(sensor, INPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
  luminosidade = map(analogRead(sensor),1015,8,0,100);
  Serial.println(luminosidade);
  delay(200);

  if (luminosidade < 40){
    pinMode(8, OUTPUT);
  }
  else 


}
$abcdeabcde151015202530354045505560fghijfghij