#include SoftwareSerial monserial(0, 1);//rx and tx int LDR = 2;//PA2 int LED = 7;//PA7 void setup() { pinMode(LED, OUTPUT); pinMode(LDR,INPUT); monserial.begin(9600); } // the loop function runs over and over again forever void loop() { int va=analogRead(LDR);//reading analog value monserial.println(va); digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(350); // wait for a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(350); // wait for a second }