Test fork nhi

Dependencies:   SDFileSystem mbed-rtos mbed emic2

Fork of BAT_senior_design by BAT

Committer:
aismail1997
Date:
Wed Oct 18 14:41:04 2017 +0000
Revision:
13:b80dde24e9bc
Parent:
10:21268d8bf979
Child:
14:581a3b02f4c3
added comments

Who changed what in which revision?

UserRevisionLine numberNew contents of line
aismail1997 10:21268d8bf979 1 #include "mbed.h"
aismail1997 10:21268d8bf979 2
aismail1997 13:b80dde24e9bc 3 // This is a button class for our custom button
aismail1997 10:21268d8bf979 4 class button {
aismail1997 10:21268d8bf979 5
aismail1997 13:b80dde24e9bc 6 // pins connected to the button
aismail1997 10:21268d8bf979 7 private:
aismail1997 10:21268d8bf979 8 PwmOut servo;
aismail1997 10:21268d8bf979 9 DigitalIn pb;
aismail1997 13:b80dde24e9bc 10 //int state; // is the button up or down
aismail1997 13:b80dde24e9bc 11 // int mode; // is the system in reading or typing mode
aismail1997 13:b80dde24e9bc 12 //AnalogIn linpot;
aismail1997 13:b80dde24e9bc 13
aismail1997 10:21268d8bf979 14 public:
aismail1997 10:21268d8bf979 15 // constructors
aismail1997 10:21268d8bf979 16 button();
aismail1997 10:21268d8bf979 17 button(PwmOut servo, DigitalIn pb);
aismail1997 10:21268d8bf979 18 // functions
aismail1997 13:b80dde24e9bc 19 PwmOut getServoPin(); // get the servo pin
aismail1997 13:b80dde24e9bc 20 //int getState(); // determine what state the button is in - up or down
aismail1997 13:b80dde24e9bc 21 void moveServoIn(); // move servo into the slot
aismail1997 13:b80dde24e9bc 22 void moveServoOut(); // move servo out of the slot
aismail1997 10:21268d8bf979 23 };