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: ELEC350-Practicals-FZ429
Fork of Task622Solution-mbedos54 by
Revision 11:67cb33bc247e, committed 2017-11-21
- Comitter:
- noutram
- Date:
- Tue Nov 21 13:23:58 2017 +0000
- Parent:
- 10:3ab2495f24d9
- Child:
- 12:01c7edd1dd19
- Commit message:
- Fixed small bug
Changed in this revision
--- a/ELEC350-Practicals-FZ429.lib Mon Nov 20 10:51:32 2017 +0000 +++ b/ELEC350-Practicals-FZ429.lib Tue Nov 21 13:23:58 2017 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/teams/University-of-Plymouth-Stage-2-and-3/code/ELEC350-Practicals-FZ429/#6f9f2e93a0be +https://os.mbed.com/teams/University-of-Plymouth-Stage-2-and-3/code/ELEC350-Practicals-FZ429/#768d30157488
--- a/main.cpp Mon Nov 20 10:51:32 2017 +0000
+++ b/main.cpp Tue Nov 21 13:23:58 2017 +0000
@@ -6,11 +6,10 @@
void addSample(float t);
void heartBeat();
-DigitalOut led(LED1);
InterruptIn btn(USER_BUTTON);
//Creates a queue with the default size
-EventQueue mainQueue(20);
+EventQueue mainQueue;
Timer tmr1;
Thread t1;
@@ -22,8 +21,10 @@
//Power on self test
post();
+ puts("Press the BLUE button as close to once a second as you can");
+
//Set up ISR
- btn.fall(buttonPressedISR);
+ btn.rise(buttonPressedISR);
//Start timer
tmr1.start();
@@ -57,7 +58,7 @@
//Display deltas
for (unsigned int n=9; n>0; n--) {
- float delta = (arrayOfTimes[n] - arrayOfTimes[n-1]);
+ float delta = (arrayOfTimes[n-1] - arrayOfTimes[n]);
printf("%5.1f ", delta);
}
printf("\n");
@@ -65,5 +66,5 @@
//Flashing LED
void heartBeat() {
- led = !led;
+ redLED = !redLED;
}
--- a/mbed-os.lib Mon Nov 20 10:51:32 2017 +0000 +++ b/mbed-os.lib Tue Nov 21 13:23:58 2017 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#78474a5129e18e136cc7e872adbaa5b74fbb8f6a +https://github.com/ARMmbed/mbed-os/#34b61d1612aaec2e5d61a8a43c9764bc2fe8aac0
