Bumper

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Bumper.hpp Source File

Bumper.hpp

00001 #ifndef BUMPER_HPP
00002 #define BUMPER_HPP
00003 
00004 //How to connect limit switch:
00005 //  C (common): pin to read
00006 //  NO (normally open): VCC
00007 //  NC (normally closed): Not connected
00008 
00009 #include "mbed.h"
00010 #include "TargetManager.hpp"
00011 
00012 class Bumper
00013 {
00014     public:
00015         Bumper(TargetManager& target_manager, int id, PinName pin);
00016         void bumped();
00017         
00018     private:
00019         InterruptIn interrupt_in;
00020         TargetManager& target_manager;
00021         const int id;
00022 };
00023 
00024 #endif