Download this file
#ifndef pushbutton_h
#define pushbutton_h

#include 

class PushButton {
  uint8_t pin;
  uint8_t old_state;
	static int8_t states[];
	unsigned long lastMillis;
public:
  PushButton(uint8_t pin);
	uint8_t getState(uint8_t debounce=25); // 1/100th seconds, not milliseconds
	int8_t getEdge();
	uint8_t getPressed();
	uint8_t getReleased();
};

#endif
// vim:ft=arduino