satbir panesar
/
elec350
my library for elec350
Button.cpp
- Committer:
- spanesar
- Date:
- 2016-10-19
- Revision:
- 3:d62097c19a4e
File content as of revision 3:d62097c19a4e:
#include "Button.h" bool Button::isPressed() { // get current value of input pin int pinValue = this->pin->read(); // check the value returned from the pin if (pinValue == 1){ return true; }else{ return false; } }