#include void setup() { // If a baudrate is passed to setup(), it will be ignored and the default setting for the //LED and autoflush is used Serial.begin( USB_LED_ENABLED | USB_AUTOFLUSH_ENABLED ); // this is the default setting pinMode(2, INPUT); //Pin B6 pinMode(24, OUTPUT); //Pin D6 } void loop() { int sensorValue = digitalRead(2); //Read Pin B6 Serial.print("digitalValue: "); Serial.println(sensorValue, DEC); //Serial.flush(); // needed if autoflush is not used digitalWrite(24,HIGH); //Pin D6 ON delay(1000); digitalWrite(24,LOW); //Pin D6 OFF delay(1000); }