Control library for the Sparkfun Entertainment Trackballer breakout board.
Diff: trackballer.cpp
- Revision:
- 10:9b35f63411ad
- Parent:
- 9:4f8eafec5a7b
- Child:
- 11:35347e6474f9
--- a/trackballer.cpp Sun Feb 20 16:17:07 2011 +0000 +++ b/trackballer.cpp Sun Feb 20 16:38:29 2011 +0000 @@ -74,11 +74,16 @@ // if the current state is 1 then the button // went from off to on: _buttonPushCounter++; - printf("Number of button pushes: %i\n", _buttonPushCounter); + button = 0x01; + //printf("Number of button pushes: %i\n", _buttonPushCounter); } } + else + { + button = 0x00; + } _lastButtonState = _buttonState; - button = !_buttonState; + //button = !_buttonState; if (_buttonPushCounter % 2 == 0)