diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-09-06 18:43:04 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-09-06 18:46:27 -0400 |
commit | 1334e87fdd13009f5ee3f95f498b0a71ad817dac (patch) | |
tree | d9cc456833112ed34113614cb485a08ffbe155d3 /examples | |
parent | ea5538b23ac066187635b1e34e620b445562d21e (diff) | |
download | librambutan-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.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/test-session.cpp | 8 |
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; |