aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-09-06 18:43:04 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-09-06 18:46:27 -0400
commit1334e87fdd13009f5ee3f95f498b0a71ad817dac (patch)
treed9cc456833112ed34113614cb485a08ffbe155d3
parentea5538b23ac066187635b1e34e620b445562d21e (diff)
downloadlibrambutan-1334e87fdd13009f5ee3f95f498b0a71ad817dac.tar.gz
librambutan-1334e87fdd13009f5ee3f95f498b0a71ad817dac.zip
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.
-rw-r--r--examples/test-session.cpp8
1 files changed, 2 insertions, 6 deletions
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;