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.
Fork of m3pi_TUB by
Diff: m3pi_ng.cpp
- Revision:
- 16:8c1f1622ce81
- Parent:
- 12:78fd82b3fb09
diff -r 954081ec1a2d -r 8c1f1622ce81 m3pi_ng.cpp
--- a/m3pi_ng.cpp Wed Jul 22 12:43:54 2015 +0000
+++ b/m3pi_ng.cpp Sat Jan 30 22:26:00 2016 +0000
@@ -245,6 +245,22 @@
return(_ser.getc());
}
+void m3pi::readsensor (int *sensor){
+
+ _ser.putc(SEND_CALIBRATED_SENSOR_VALUES);
+ sensor[0] = _ser.getc();
+ sensor[0] += _ser.getc() << 8;
+ sensor[1] = _ser.getc();
+ sensor[1] += _ser.getc() << 8;
+ sensor[2] = _ser.getc();
+ sensor[2] += _ser.getc() << 8;
+ sensor[3] = _ser.getc();
+ sensor[3] += _ser.getc() << 8;
+ sensor[4] = _ser.getc();
+ sensor[4] += _ser.getc() << 8;
+
+ return;
+}
