新ロリコンがオープンコレクタらしいので、mode関数で内部プルアップするようにした。旧ロリコンはオープンコレクタではないので注意
Fork of QEI by
Revision 1:172296646075, committed 2018-08-16
- 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 |
diff -r 5c2ad81551aa -r 172296646075 QEI.cpp --- 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();