![](/media/cache/group/200px-Rohm_logo_2009.png.50x50_q85.png)
An example program for Lazurite Graph
Dependencies: BM1383GLV KX022 mbed
main.cpp
- Committer:
- MACRUM
- Date:
- 2016-03-23
- Revision:
- 1:55d8217fc776
- Parent:
- 0:1457224f3c74
File content as of revision 1:55d8217fc776:
/* 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); } }