1234567891011121314151617 |
- void setup() {
- // max baud rate
- Serial.begin(2000000);
- Serial.println("Serial PPS generator v0.1 started");
- pinMode(13, OUTPUT); // sets the digital pin 13 as output
- }
- int incomingByte = 0; // for incoming serial data
- void loop() {
- if (Serial.available() > 0) {
- // read the incoming byte:
- incomingByte = Serial.read();
- digitalWrite(13, HIGH); // sets the digital pin 13 on
- delay(10); // waits for 10 ms
- digitalWrite(13, LOW); // sets the digital pin 13 off
- }
- }
|