/*Input-Node*/ #include SoftwareSerial softSerial(1, 2); //RX, TX void setup() { // initialize serial communication at 9600 bits per second: softSerial.begin(9600); } void loop() { // reads the input on analog pin A0 (value between 0 and 1023) int analogValue = analogRead(A3); // softSerial.print("Analog reading = "); // softSerial.println(analogValue); // the raw analog reading // We'll have a few threshholds, qualitatively determined if (analogValue < 400) { //Bright- turn lights off softSerial.println("10"); delay(1000); softSerial.println("20"); } else { //Dark- turn lights on softSerial.print("11"); delay(1000); softSerial.print("21"); } delay(1000); }