jy901の確認用プログラム わからなければ安澤が何とかします
Dependencies: jy901 SerialStream 03_JY901_practice
Revision 5:85564a8445f9, committed 2021-01-30
- Comitter:
- piroro4560
- Date:
- Sat Jan 30 10:50:42 2021 +0000
- Parent:
- 4:3acbcab5085b
- Commit message:
- 1/30/2021
Changed in this revision
diff -r 3acbcab5085b -r 85564a8445f9 103_JY901_practice.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/103_JY901_practice.lib Sat Jan 30 10:50:42 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/teams/Quadrifoglio/code/03_JY901_practice/#3acbcab5085b
diff -r 3acbcab5085b -r 85564a8445f9 SerialStream.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SerialStream.lib Sat Jan 30 10:50:42 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/MultipleMonomials/code/SerialStream/#3736580f2dbe
diff -r 3acbcab5085b -r 85564a8445f9 jy901.lib --- a/jy901.lib Fri Jan 08 10:19:48 2021 +0000 +++ b/jy901.lib Sat Jan 30 10:50:42 2021 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/teams/Quadrifoglio/code/jy901/#2397765e5b08 +https://os.mbed.com/teams/Quadrifoglio/code/jy901/#79d045ea3542
diff -r 3acbcab5085b -r 85564a8445f9 main.cpp --- a/main.cpp Fri Jan 08 10:19:48 2021 +0000 +++ b/main.cpp Sat Jan 30 10:50:42 2021 +0000 @@ -1,16 +1,17 @@ #include "mbed.h" #include "jy901.h" -JY901 jy(PB_4, PA_8); //sda, scl -Serial pc(USBTX, USBRX, 115200); +JY901 jy(D14, D15); //sda, scl +BufferedSerial pc(USBTX, USBRX, 115200); int main() { - float x, y, z; + double x, y, z; jy.calibrateAll(50); while(1) { x = jy.getXaxisAngle(); y = jy.getYaxisAngle(); z = jy.getZaxisAngle(); - pc.printf("x:%f | y:%f | z:%f\r\n", x, y, z); +// printf("x: %f | y: %f | z: %f test: %f \r\n", x, y, z); + printf("test %f\r\n", 100.0023); } } \ No newline at end of file
diff -r 3acbcab5085b -r 85564a8445f9 mbed-os.lib --- a/mbed-os.lib Fri Jan 08 10:19:48 2021 +0000 +++ b/mbed-os.lib Sat Jan 30 10:50:42 2021 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#679d24833acf0a0b5b0d528576bb37c70863bc4e +https://github.com/ARMmbed/mbed-os/#bfde5aa1e74802771eaeacfa74789f71677325cb