David Cho
/
blood_pressure_monitor
4180
Revision 0:f80f6460d556, committed 2019-04-15
- Comitter:
- davidcho23
- Date:
- Mon Apr 15 18:23:54 2019 +0000
- Commit message:
- first
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r f80f6460d556 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Apr 15 18:23:54 2019 +0000 @@ -0,0 +1,41 @@ +#include "mbed.h" + +DigitalOut myled(LED1); + + + +void printReadings(void const *args) { + while(1) { + LCD.lock(); + uLCD.locate(0,1); + uLCD.printf(cur_data); + uLCD.locate(0,3); + for (int i = 0; i < 10; i++) { + uLCD.printf(signal[i]); + uLCD.printf(" "); + } + LCD.unlock(); + } +} + +int main() { + uLCD.cls(); + uLCD.printf("Change baudrate......"); + uLCD.baudrate(3000000); //jack up baud rate to max + uLCD.background_color(BLACK); + uLCD.cls(); + uLCD.color(WHITE); + uLCD.text_height(2); + uLCD.text_width(2); + + Thread thread1(readSensor); + Thread thread2(changeValve); + Thread thread3(printLCD); + + while(1) { + myled = 1; + wait(0.2); + myled = 0; + wait(0.2); + } +}
diff -r 000000000000 -r f80f6460d556 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Apr 15 18:23:54 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file