a simple code for elevator

Dependencies:   PinDetect mbed Servo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LED.h Source File

LED.h

00001 /*
00002  * PROGRAM RESPONSIBLE FOR open/close door.
00003  * ^^^^^^^ ^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^
00004  *
00005  * FILE NAME: LED.h
00006  * USAGE: library file of LED.cpp
00007  */
00008 
00009 
00010 /*
00011 * including the wanted library files.
00012 */
00013 #include "mbed.h"
00014 #include "event_and_actions.h"
00015 
00016 /*function prototype*/
00017 void open_close_doors ( int f) ;
00018 void doors (void);
00019 void doors_start (void) ;
00020 
00021 /* array that shift the LED truning on/off */
00022 #ifndef DOORS
00023 #define DOORS
00024 const unsigned short door_light[2][28]= {
00025     {   0xFFFF,0xFFFF,0xFFFF,
00026         0xE7FF,0xE7FF,0xE7FF,
00027         0xC3FF,0xC3FF,0xC3FF,
00028         0x81FF,0x00FF,  0x81FF,0x00FF,  0x81FF,0x00FF,  0x81FF,0x00FF,  0x81FF,0x00FF,
00029         0xC3FF,0xC3FF,0xC3FF,
00030         0xE7FF,0xE7FF,0xE7FF,
00031         0xFFFF,0xFFFF,0xFFFF
00032     }, {
00033         0xFFFF,0xFFFF,0xFFFF,
00034         0xFFE7,0xFFE7,0xFFE7,
00035         0xFFC3,0xFFC3,0xFFC3,
00036         0xFF81,0xFF00,  0xFF81,0xFF00,  0xFF81,0xFF00,  0xFF81,0xFF00,  0xFF81,0xFF00,
00037         0xFFC3,0xFFC3,0xFFC3,
00038         0xFFE7,0xFFE7,0xFFE7,
00039         0xFFFF,0xFFFF,0xFFFF
00040     }
00041 };
00042 
00043 
00044 #endif