jy901の確認用プログラム わからなければ安澤が何とかします
Dependencies: jy901 SerialStream 03_JY901_practice
main.cpp
00001 #include "mbed.h" 00002 #include "jy901.h" 00003 00004 JY901 jy(D14, D15); //sda, scl 00005 BufferedSerial pc(USBTX, USBRX, 115200); 00006 00007 int main() { 00008 double x, y, z; 00009 jy.calibrateAll(50); 00010 while(1) { 00011 x = jy.getXaxisAngle(); 00012 y = jy.getYaxisAngle(); 00013 z = jy.getZaxisAngle(); 00014 // printf("x: %f | y: %f | z: %f test: %f \r\n", x, y, z); 00015 printf("test %f\r\n", 100.0023); 00016 } 00017 }
Generated on Sun Aug 28 2022 08:15:22 by
1.7.2