Pages: [1]   Go Down
Author Topic: Button Library - Need Testers!  (Read 480 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://23longacre.com/sharedFiles/code/arduino/digital_io/ButtonLibrary_20101029.zip

As a preview here is the list of public functions...
Code:
 public:
  // 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);

THANKS!!
« Last Edit: October 30, 2010, 01:20:04 am by carlyn » Logged

Sweden
Offline Offline
Full Member
***
Karma: 11
Posts: 237
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: