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
- Committer:
- MACRUM
- Date:
- 2015-12-30
- Revision:
- 1:a531b03fca97
- Parent:
- 0:b5c7d79e5d7c
- Child:
- 2:b958ed2f998d
File content as of revision 1:a531b03fca97:
#include "mbed.h"
#include "KX022.h"
Serial pc(USBTX, USBRX);
KX022 acc(I2C_SDA, I2C_SCL);
int main() {
pc.printf("\nKX022 Accelerometer library test program.\n");
while(1) {
wait(0.5);
pc.printf("x=%7.4f, y=%7.4f, z=%7.4f\n", acc.getAccX(), acc.getAccY(), acc.getAccZ());
}
}
Rohm/Kionix KX022-1020 | Accelerometer