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.
Dependents: LinkNode_DataAdvertising LinkNode_DataAdvertising1
Fork of TMP_nrf51 by
Revision 5:29171beb6b8c, committed 2016-04-06
- Comitter:
- helloqi
- Date:
- Wed Apr 06 08:57:47 2016 +0000
- Parent:
- 4:ee98296289d0
- Commit message:
- change the name
Changed in this revision
| Sensors.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Sensors.cpp Mon Feb 22 08:55:19 2016 +0000
+++ b/Sensors.cpp Wed Apr 06 08:57:47 2016 +0000
@@ -1,17 +1,17 @@
#include "Sensors.h"
-Ticker ticker1;
+InterruptIn btn(P0_28);
uint64_t p_temp;
-uint64_t data_1;
+uint64_t data_1=0;
void add_data(void)
{
- data_1 =0x123456789abcdef ;
+ data_1 = ~data_1;
}
Sensors::tmpSensorValue_t Sensors::get()
{
- ticker1.attach(add_data,1);
+ btn.rise(&add_data);
p_temp = data_1;
return p_temp;
}
