TargetManager
Dependents: TargetManagerManualTest NerfUSTarget
include/Bumper.hpp@10:1b5440d9226c, 2017-04-11 (annotated)
- Committer:
- GaiSensei
- Date:
- Tue Apr 11 03:47:38 2017 +0000
- Revision:
- 10:1b5440d9226c
- Parent:
- 9:1069bd8c9472
Calibrate servomotors
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dupm2216 | 1:45fbca28eb57 | 1 | #ifndef BUMPER_HPP |
dupm2216 | 1:45fbca28eb57 | 2 | #define BUMPER_HPP |
dupm2216 | 1:45fbca28eb57 | 3 | |
dupm2216 | 2:08171ac3fea4 | 4 | //Limit switch connections: |
dupm2216 | 1:45fbca28eb57 | 5 | // C (common): pin to read |
dupm2216 | 1:45fbca28eb57 | 6 | // NO (normally open): VCC |
dupm2216 | 2:08171ac3fea4 | 7 | // NC (normally closed): GND |
dupm2216 | 2:08171ac3fea4 | 8 | //Source: http://www.omron.com.au/service_support/FAQ/FAQ03206/index.asp |
dupm2216 | 1:45fbca28eb57 | 9 | |
dupm2216 | 1:45fbca28eb57 | 10 | #include "mbed.h" |
dupm2216 | 3:70212b0e0939 | 11 | #include "NerfusCallbackInterface.hpp" |
dupm2216 | 1:45fbca28eb57 | 12 | |
dupm2216 | 1:45fbca28eb57 | 13 | class Bumper |
dupm2216 | 1:45fbca28eb57 | 14 | { |
dupm2216 | 1:45fbca28eb57 | 15 | public: |
GaiSensei | 10:1b5440d9226c | 16 | Bumper(PinName pin, NerfusCallbackInterface* nerfus_rise_callback); |
GaiSensei | 10:1b5440d9226c | 17 | void set_callbacks(NerfusCallbackInterface* nerfus_rise_callback); |
GaiSensei | 10:1b5440d9226c | 18 | void rise_callback(); |
dupm2216 | 1:45fbca28eb57 | 19 | |
GaiSensei | 9:1069bd8c9472 | 20 | private: |
dupm2216 | 1:45fbca28eb57 | 21 | InterruptIn interrupt_in; |
GaiSensei | 10:1b5440d9226c | 22 | NerfusCallbackInterface* nerfus_rise_callback; |
dupm2216 | 1:45fbca28eb57 | 23 | }; |
dupm2216 | 1:45fbca28eb57 | 24 | |
dupm2216 | 1:45fbca28eb57 | 25 | #endif |