mbed Sensor node for Instrumented Booth over ETH.
Dependencies: EthernetInterface-1 MaxbotixDriver Presence HTU21D_TEMP_HUMID_SENSOR_SAMPLE Resources SHARPIR mbed-rtos mbed-src WDT_K64F nsdl_lib
Fork of Trenton_Switch_LPC1768_ETH by
Door_Trip/DoorTrip.h
- Committer:
- andcor02
- Date:
- 2015-07-16
- Revision:
- 46:807e9cf63f4c
- Parent:
- 40:b2e9bc654ca1
File content as of revision 46:807e9cf63f4c:
/* DoorTrip.cpp - DoorTrip sensor library Developed by Andrea Corrado & Eric Gowland Connect to a hardware device that is boolean present/not present. Such as PIR, Rangefinder or laser with appropriate signalling. Also drives LED as DoorTrip indicator. */ #ifndef MBED_DOOR_H #define MBED_DOOR_H #include "mbed.h" class DoorTrip{ public: DoorTrip(PinName pin, bool true_on_rise, int debounce_time_ms); bool isPresent(); private: InterruptIn _myint; DigitalOut _led1; bool _detection; bool _true_on_rise; int debounce_ms; Timer debounce_timer; void DoorTrip_interrupt_on(); void DoorTrip_interrupt_off(); }; #endif