From 1334e87fdd13009f5ee3f95f498b0a71ad817dac Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Tue, 6 Sep 2011 18:43:04 -0400 Subject: test-session.cpp: Fix 'd' command. Actually read a character each time we ask for one. Put pin 22 back into OUTPUT mode when we're done. --- examples/test-session.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/test-session.cpp b/examples/test-session.cpp index 7ed113b..59d8ac0 100644 --- a/examples/test-session.cpp +++ b/examples/test-session.cpp @@ -210,16 +210,12 @@ void loop () { SerialUSB.println("Pulling down D4, D22. Press any key."); pinMode(22, INPUT_PULLDOWN); pinMode(4, INPUT_PULLDOWN); - while (!SerialUSB.available()) { - continue; - } + SerialUSB.read(); SerialUSB.println("Pulling up D4, D22. Press any key."); pinMode(22, INPUT_PULLUP); pinMode(4, INPUT_PULLUP); - while (!SerialUSB.available()) { - continue; - } SerialUSB.read(); + pinMode(22, OUTPUT); pinMode(4, OUTPUT); break; -- cgit v1.2.3