![](/media/cache/profiles/acab0116c354964a558e65bdd07ff047.jpg.50x50_q85.jpg)
Coursework template
Dependencies: BMP280 TextLCD BME280
sample_hardware.hpp@0:57d39f966513, 2018-11-24 (annotated)
- Committer:
- noutram
- Date:
- Sat Nov 24 09:35:51 2018 +0000
- Revision:
- 0:57d39f966513
updated for 2018;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
noutram | 0:57d39f966513 | 1 | #ifndef __sample_hardware__ |
noutram | 0:57d39f966513 | 2 | #define __sample_hardware__ |
noutram | 0:57d39f966513 | 3 | |
noutram | 0:57d39f966513 | 4 | //#define BME |
noutram | 0:57d39f966513 | 5 | #ifdef BME |
noutram | 0:57d39f966513 | 6 | #include "BME280.h" |
noutram | 0:57d39f966513 | 7 | #else |
noutram | 0:57d39f966513 | 8 | #include "BMP280.h" |
noutram | 0:57d39f966513 | 9 | #endif |
noutram | 0:57d39f966513 | 10 | #include "TextLCD.h" |
noutram | 0:57d39f966513 | 11 | #include "SDBlockDevice.h" |
noutram | 0:57d39f966513 | 12 | #include "FATFileSystem.h" |
noutram | 0:57d39f966513 | 13 | |
noutram | 0:57d39f966513 | 14 | enum ELEC350_ERROR_CODE {OK, FATAL}; |
noutram | 0:57d39f966513 | 15 | |
noutram | 0:57d39f966513 | 16 | extern DigitalOut onBoardLED; |
noutram | 0:57d39f966513 | 17 | extern DigitalOut redLED; |
noutram | 0:57d39f966513 | 18 | extern DigitalOut yellowLED; |
noutram | 0:57d39f966513 | 19 | extern DigitalOut greenLED; |
noutram | 0:57d39f966513 | 20 | |
noutram | 0:57d39f966513 | 21 | extern DigitalIn onBoardSwitch; |
noutram | 0:57d39f966513 | 22 | extern DigitalIn SW1; |
noutram | 0:57d39f966513 | 23 | extern DigitalIn SW2; |
noutram | 0:57d39f966513 | 24 | //extern Serial pc; |
noutram | 0:57d39f966513 | 25 | extern AnalogIn adcIn; |
noutram | 0:57d39f966513 | 26 | |
noutram | 0:57d39f966513 | 27 | #ifdef BME |
noutram | 0:57d39f966513 | 28 | extern BME280 sensor; |
noutram | 0:57d39f966513 | 29 | #else |
noutram | 0:57d39f966513 | 30 | extern BMP280 sensor; |
noutram | 0:57d39f966513 | 31 | #endif |
noutram | 0:57d39f966513 | 32 | |
noutram | 0:57d39f966513 | 33 | extern TextLCD lcd; |
noutram | 0:57d39f966513 | 34 | extern SDBlockDevice sd; |
noutram | 0:57d39f966513 | 35 | |
noutram | 0:57d39f966513 | 36 | extern void post(); |
noutram | 0:57d39f966513 | 37 | extern void errorCode(ELEC350_ERROR_CODE err); |
noutram | 0:57d39f966513 | 38 | |
noutram | 0:57d39f966513 | 39 | #endif |