int DP_LED = 16;
int command;
// the setup function runs once when you press reset or power the board
void setup() {
pinMode(16, OUTPUT);
Serial1.begin(115200);
delay(100);
Serial1.println("Type s to start!\n");
while(!Serial1.available() > 0);
command = Serial1.read();
if(command == 's'){
Serial1.println("Blinking DP LED every 500ms!");
}
else {
Serial1.println("Command is wrong!");
exit(1);
}
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(DP_LED, HIGH); // turn the LED off (HIGH is the voltage level)
Serial1.print("DP LED is OFF!\n");
delay(500);
digitalWrite(DP_LED, LOW); // turn the LED on
Serial1.print("DP LED is ON!\n");
delay(500);
}