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: BM1383GLV KX022 mbed
Diff: main.cpp
- Revision:
- 0:1457224f3c74
diff -r 000000000000 -r 1457224f3c74 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Mar 23 03:29:44 2016 +0000
@@ -0,0 +1,29 @@
+/*
+
+Test program to use Rohm sensors with Lazurite Graph application
+http://www.lapis-semi.com/lazurite-jp/contents/LazuriteGraph/LazuriteGraph.html
+
+*/
+
+#include "mbed.h"
+#include "KX022.h"
+#include "BM1383GLV.h"
+
+Serial pc(USBTX, USBRX);
+KX022 acc(I2C_SDA, I2C_SCL);
+BM1383GLV sensor(I2C_SDA, I2C_SCL);
+
+int main() {
+ pc.baud(115200);
+
+ while(1) {
+ pc.printf("STX,");
+ pc.printf("%.2f,", acc.getAccX());
+ pc.printf("%.2f,", acc.getAccY());
+ pc.printf("%.2f,", acc.getAccZ());
+ pc.printf("%.2f,", sensor.getPressure());
+ pc.printf("%.2f", sensor.getTemperature());
+ pc.printf(",ETX\n");
+ wait(0.1);
+ }
+}