#include ; SoftwareSerial mySerial(PB1, PB2); void setup() { // put your setup code here, to run once: mySerial.begin(9600); pinMode (PB3, INPUT); } void loop() { // put your main code here, to run repeatedly: long a = 0; a = analogRead(PB3); if (a >= 700) { mySerial.println("Dark"); delay(200); } if (a < 700) { mySerial.println("Bright"); delay(200); } }