Alvaro Cassinelli / Mbed 2 deprecated skinGames_forktest

Dependencies:   mbed

Fork of scoreLight_Advanced by Alvaro Cassinelli

Revision:
44:46e25fa1669b
Parent:
42:c4e9c1116af4
--- a/hardwareIO/CRotaryEncoder.cpp	Fri Mar 28 10:25:06 2014 +0000
+++ b/hardwareIO/CRotaryEncoder.cpp	Mon Mar 31 10:57:35 2014 +0000
@@ -8,10 +8,12 @@
 CRotaryEncoder::CRotaryEncoder(PinName pinA, PinName pinB)
 {
     m_pinA = new InterruptIn(pinA);
+    m_pinA->mode(PullUp); // this is for use in the case of the simple contact based rotary encoder (common is tied to ground)
     m_pinA->rise(this, &CRotaryEncoder::rise);
     m_pinA->fall(this, &CRotaryEncoder::fall);
 
     m_pinB = new DigitalIn(pinB);
+    m_pinB->mode(PullUp); 
     m_position = 0;
     
     newValue=true;