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
Diff: Main/main.h
- Revision:
- 0:d5312060f649
- Child:
- 1:76241e21ec61
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Main/main.h Wed Mar 08 20:05:58 2017 +0000 @@ -0,0 +1,45 @@ +#ifndef MAIN_H +#define MAIN_H + +// include the different header files +#include "mbed.h" +#include "N5110.h" +#include "Shift.h" +#include "Tone.h" +#include "ModeA.h" +#include "ModeB.h" +#include "ModeC.h" +#include "ModeD.h" + +// extern tells the compiler that these objects are defined in a different file (main.cpp). +// It stops them being defined multiple times when other files include main.h. +// Here we only declare them. They are defined (with pin numbers etc.) in main.cpp +extern DigitalIn button_a; +extern DigitalIn button_b; +extern DigitalIn button_c; +extern DigitalIn button_d; + +extern N5110 lcd; +extern BusOut leds; + +extern AnalogIn ldr; + +extern PwmOut red_led; +extern PwmOut green_led; +extern PwmOut blue_led; + +extern AnalogIn tmp36; + +extern AnalogIn pot_0; +extern AnalogIn pot_1; +extern AnalogIn pot_2; + +extern Tone speaker; +extern Shift; + +// function prototypes +void init(); +void print_menu(); +void welcome(); + +#endif \ No newline at end of file