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: jy901 SerialStream 03_JY901_practice
main.cpp
- Committer:
- piroro4560
- Date:
- 2021-01-30
- Revision:
- 5:85564a8445f9
- Parent:
- 1:fc04d6a786b0
File content as of revision 5:85564a8445f9:
#include "mbed.h"
#include "jy901.h"
JY901 jy(D14, D15); //sda, scl
BufferedSerial pc(USBTX, USBRX, 115200);
int main() {
double x, y, z;
jy.calibrateAll(50);
while(1) {
x = jy.getXaxisAngle();
y = jy.getYaxisAngle();
z = jy.getZaxisAngle();
// printf("x: %f | y: %f | z: %f test: %f \r\n", x, y, z);
printf("test %f\r\n", 100.0023);
}
}