Skip to content

Commit 0b93ee3

Browse files
committed
Change to 1m baud, record micros, and all on one line
1 parent bdebe01 commit 0b93ee3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vg4_keyboard/logic_analyzer/logic_analyzer.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void setup() {
1818
delay(10);
1919
digitalWrite(resetPin , HIGH);
2020

21-
Serial.begin(9600);
21+
Serial.begin(1000000);
2222
Serial.println("Hello logic_analyzer");
2323
}
2424

@@ -32,11 +32,11 @@ void loop() {
3232
inKey = 1; // we're recording until numones==30
3333
numOnes = 0;
3434
Serial.println("START");
35-
Serial.println("0");
35+
Serial.print(micros()); Serial.print(", 0, ");
3636
digitalWrite(LED_BUILTIN, HIGH);
3737
} else if (inKey) {
3838
if (data == HIGH) {
39-
Serial.println("1");
39+
Serial.print(micros()); Serial.print(", 1, ");
4040
numOnes++;
4141
if (numOnes == 30) {
4242
inKey = 0;
@@ -47,7 +47,7 @@ void loop() {
4747
}
4848
} else {
4949
numOnes = 0;
50-
Serial.println("0");
50+
Serial.print(micros()); Serial.print(", 0, ");
5151
}
5252
}
5353
}

0 commit comments

Comments
 (0)