a simple code for elevator
Dependencies: PinDetect mbed Servo
main.h
- Committer:
- kemken
- Date:
- 2012-06-04
- Revision:
- 0:85829f7bbe62
File content as of revision 0:85829f7bbe62:
/* * THE MAIN FILE OF THIS PROGRAM. * ^^^ ^^^^ ^^^^ ^^ ^^^^ ^^^^^^^ * * FILE NAME: main.h * USAGE: library file of main.cpp */ /* * including the wanted library files. */ #include "mbed.h" /* Defines an enumeration type (event)*/ #ifndef EVENT #define EVENT enum event {B_level_1, B_level_2, call_1, call_2, NR_top, NR_bottom, at_top, at_bottom, timeout, safety,MAX_EVENT} ; #endif /* Defines an enumeration type (state)*/ #ifndef STATE #define STATE enum state {top, waiting_beeper_tp, waiting_door_tp, wating_top_sw, going_down,bottom, waiting_beeper_bm, waiting_door_bm, waiting_bottom_sw, going_up, waiting_for_safety, waiting_for_Bfloor, MAX_STATE } ; #endif /*variables that have been defined in another location*/ extern int floor_level; extern int LED_order; extern int order; extern int upload; extern int loaded; extern float varying_speed; extern float speed_now; extern int delta_time;