Go Down

Topic: Button Library - Need Testers! (Read 653 times) previous topic - next topic


Oct 30, 2010, 08:18 am Last Edit: Oct 30, 2010, 08:20 am by carlyn Reason: 1
Hey Folks,

I created a button library awhile back and I just never got around to posting it.

I just did some updates but before I put it on the playground I'd love to get some other folks to poke around at it.

It comes with 12 examples and a readme file.


As a preview here is the list of public functions...
Code: [Select]

 // constructors:
   Button(int myPin, bool myMode);
   Button(int myBit, bool myMode, unsigned char *myRegister);
   char* version(void);                  // get the library version
   unsigned char getRegisterValue(void);
   void listen(void);
   bool isReleased(void);
   bool isPressed(void);
   bool isReleased(bool refreshPinData);
   bool isPressed(bool refreshPinData);
   bool onChange(void);  
   bool onPress(void);
   bool onRelease(void);
   bool onChange(bool refreshPinData);  
   bool onPress(bool refreshPinData);
   bool onRelease(bool refreshPinData);
   unsigned int getDebounceDelay(void);
   void setDebounceDelay(unsigned int);
   void clearDebounceDelay(void);
   bool onDoubleClick(void);
   bool onDoubleClick(bool refreshPinData);
   unsigned int getDoubleClickDelay(void);
   void setDoubleClickDelay(unsigned int);
   bool onPressAsToggle(void);
   bool onReleaseAsToggle(void);
   bool onPressAsToggle(bool refreshPinData);
   bool onReleaseAsToggle(bool refreshPinData);
   bool isHold(void);
   bool isHold(bool refreshPinData);
   unsigned int getHoldDelay(void);
   void setHoldDelay(unsigned int);
   unsigned int getPressCount(void);
   void clearPressCount(void);    
   unsigned int getReleaseCount(void);
   void clearReleaseCount(void);
   bool isNthPress(unsigned int moduloByMe);
   bool isNthRelease(unsigned int moduloByMe);



I could try to help you but the link doesn't seam to work.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131