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: BMP180 N5110 mbed
Diff: main.cpp
- Revision:
- 5:3246c4b8362c
- Parent:
- 4:0302731434a5
- Child:
- 6:1b5603fd1a9c
--- a/main.cpp Thu Apr 30 17:14:08 2015 +0000
+++ b/main.cpp Thu May 07 16:11:21 2015 +0000
@@ -12,6 +12,7 @@
InterruptIn buttonleft(p15);
AnalogIn BUT2(p16);
AnalogIn POT(p20);
+DigitalOut led(p25);
int nx=84;
int ny=48;
@@ -29,9 +30,11 @@
Ticker timerT;
Ticker timerP;
+Ticker timerE;
int timerTFlag = 0;
int timerPFlag = 0;
+int timerEFlag = 0;
void timerTExpired(){
timerTFlag = 1;
@@ -39,11 +42,27 @@
void timerPExpired(){
timerPFlag = 1;
}
+void timerEExpired(){
+ timerEFlag = 1;
+}
void buttonPressed(){
buttonFlag=1;
}
+void error(){
+ timerE.attach(&timerEExpired,2.0);
+ while(1){
+ if (timerEFlag){
+ timerEFlag=0;
+ led=1;
+ wait(1.0);
+ led=0;
+ }
+ }
+}
+
+
void callTemp(){
Measurement measurement;
clearCells();