Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: N5110 ShiftReg Tone mbed
Fork of 1620_Project_Template by
main.h
00001 #ifndef MAIN_H 00002 #define MAIN_H 00003 00004 // include the different header files 00005 #include "mbed.h" 00006 #include "N5110.h" 00007 #include "ShiftReg.h" 00008 #include "Tone.h" 00009 #include "ModeA.h" 00010 #include "ModeB.h" 00011 #include "ModeC.h" 00012 #include "ModeD.h" 00013 00014 // extern tells the compiler that these objects are defined in a different file (main.cpp). 00015 // It stops them being defined multiple times when other files include main.h. 00016 // Here we only declare them. They are defined (with pin numbers etc.) in main.cpp 00017 extern DigitalIn button_a; 00018 extern DigitalIn button_b; 00019 extern DigitalIn button_c; 00020 extern DigitalIn button_d; 00021 00022 extern N5110 lcd; 00023 extern BusOut leds; 00024 00025 extern AnalogIn ldr; 00026 00027 extern PwmOut red_led; 00028 extern PwmOut green_led; 00029 extern PwmOut blue_led; 00030 00031 extern AnalogIn tmp36; 00032 00033 extern AnalogIn pot_0; 00034 extern AnalogIn pot_1; 00035 extern AnalogIn pot_2; 00036 00037 extern Tone speaker; 00038 extern ShiftReg shift; 00039 00040 // function prototypes 00041 void init(); 00042 void print_menu(); 00043 void welcome(); 00044 00045 #endif
Generated on Wed Jul 13 2022 07:12:38 by
1.7.2
