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.
main.cpp
00001 00002 #include "mbed.h" 00003 #include "KX022.h" 00004 00005 Serial pc(USBTX, USBRX); 00006 KX022 acc(I2C_SDA, I2C_SCL); 00007 00008 int main() { 00009 pc.printf("\nKX022 Accelerometer library test program.\n\r"); 00010 00011 while(1) { 00012 wait(0.5); 00013 pc.printf("x=%7.4f, y=%7.4f, z=%7.4f\n\r", acc.getAccX(), acc.getAccY(), acc.getAccZ()); 00014 } 00015 }
Generated on Thu Jul 14 2022 05:08:18 by
1.7.2
Rohm/Kionix KX022-1020 | Accelerometer