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: mbed PulseSensor2 SCP1000 mbed-rtos 4DGL-uLCD-SE LSM9DS1_Library_cal PinDetect FatFileSystemCpp GP-20U7
Diff: main.cpp
- Revision:
- 23:1971e5cb6e3f
- Parent:
- 22:9442c37f793f
- Child:
- 24:841ceaf2cf69
--- a/main.cpp Thu Apr 16 01:40:19 2020 +0000
+++ b/main.cpp Fri Apr 17 23:01:59 2020 +0000
@@ -30,6 +30,7 @@
volatile int mode = 1;
volatile int oldMode = 1;
+Mutex mtx;
Thread thread1;
Thread thread2;
Thread thread3;
@@ -95,16 +96,6 @@
}
}
-/*
-//Make sure program still alive
-void blink_led() {
- while(1) {
- led2 = !led2;
- Thread::wait(1000);
- }
-}
-*/
-
void update_screen(void) {
while(1) {
mtx.lock();
@@ -172,7 +163,7 @@
}
//Read barometer and count floors
-void read_barameter() {
+void read_barometer() {
unsigned long pressure;
while(run) {
pressure = scp1000.readPressure();

