新ロリコンがオープンコレクタらしいので、mode関数で内部プルアップするようにした。旧ロリコンはオープンコレクタではないので注意

Fork of QEI by Aaron Berk

Files at this revision

API Documentation at this revision

Comitter:
NYANTA
Date:
Thu Aug 16 08:49:45 2018 +0000
Parent:
0:5c2ad81551aa
Commit message:
teraterm???????

Changed in this revision

QEI.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/QEI.cpp	Thu Sep 02 16:48:55 2010 +0000
+++ b/QEI.cpp	Thu Aug 16 08:49:45 2018 +0000
@@ -139,6 +139,9 @@
     revolutions_  = 0;
     pulsesPerRev_ = pulsesPerRev;
     encoding_     = encoding;
+    
+    channelA_.mode(PullUp);
+    channelB_.mode(PullUp);
 
     //Workout what the current state is.
     int chanA = channelA_.read();