uart_pps.ino 530 B

1234567891011121314151617
  1. void setup() {
  2. // max baud rate
  3. Serial.begin(2000000);
  4. Serial.println("Serial PPS generator v0.1 started");
  5. pinMode(13, OUTPUT); // sets the digital pin 13 as output
  6. }
  7. int incomingByte = 0; // for incoming serial data
  8. void loop() {
  9. if (Serial.available() > 0) {
  10. // read the incoming byte:
  11. incomingByte = Serial.read();
  12. digitalWrite(13, HIGH); // sets the digital pin 13 on
  13. delay(10); // waits for 10 ms
  14. digitalWrite(13, LOW); // sets the digital pin 13 off
  15. }
  16. }