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.
Diff: button.cpp
- Revision:
- 1:16b0f2898739
- Child:
- 2:e3cd1e0c3b78
diff -r c912cdfab475 -r 16b0f2898739 button.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/button.cpp Thu Oct 15 11:20:49 2015 +0000
@@ -0,0 +1,20 @@
+#include "button.h" //header file included
+
+
+Button::Button(string s){
+ if (s == "user"){
+ pin = new DigitalIn(PA_0);
+ }
+}
+
+bool Button::ifPressed();{
+ int ButtonPress = read();
+
+ if (ButtonPress==1){
+ return true;
+
+ else{
+ return false;
+ }
+ }
+}
\ No newline at end of file