Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ele350 by
buttom.cpp
- Committer:
- GGHHHH
- Date:
- 2015-10-22
- Revision:
- 2:9a0770c4fdd6
- Parent:
- 1:2a1a443f619e
File content as of revision 2:9a0770c4fdd6:
#include "button.h" Button::Button(string name) { if( name == "user"); { this->pin = new DigitalIn(PA_0); } } bool Button::isPressed() { int pinValue = this->pin->read(); if (pinValue == 1) { return true; } else{ return false; } }