
aaa
Fork of 0NicksCoursework-lg by
components.cpp
- Committer:
- liam_grazier
- Date:
- 2018-01-05
- Revision:
- 5:9b4844128e09
- Child:
- 7:dd303488e55d
File content as of revision 5:9b4844128e09:
#include "mbed.h" #include "components.hpp" #include "lglcd.h" //#include "Networkbits.hpp" #define RED_DONE 1 #define YELLOW_DONE 2 //Digital outputs DigitalOut onBoardLED(LED1); DigitalOut redLED(PE_15); DigitalOut yellowLED(PB_10); DigitalOut greenLED(PB_11); //Inputs DigitalIn onBoardSwitch(USER_BUTTON); DigitalIn SW1(PE_12); DigitalIn SW2(PE_14); //Serial pc(USBTX, USBRX); AnalogIn adcIn(PA_0); //Environmental Sensor driver #ifdef BME BME280 sensor(D14, D15); #else BMP280 sensor(D14, D15); #endif lglcd mylcd(D7,D6,D5,D4,D3,D2); //POWER ON SELF TEST void post() { //posttest } void errorCode(ELEC350_ERROR_CODE err) { switch (err) { case OK: greenLED = 1; wait(1.0); greenLED = 0; return; case FATAL: while(1) { redLED = 1; wait(0.1); redLED = 0; wait(0.1); } }; }