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 #include "mbed.h" 00002 #include "rtos.h" 00003 #include "angle.h" 00004 ANGLE angle(p28, p27); 00005 Serial pc(USBTX, USBRX); 00006 Ticker T; 00007 void led2_thread(void const *argument) { 00008 while (true) { 00009 angle.set_angle(); 00010 Thread::wait(0.001); 00011 } 00012 } 00013 00014 int main(){ 00015 double g[3]; 00016 Thread thread(led2_thread); 00017 //double angle[3]; 00018 int d[3]; 00019 short rate[3]; 00020 Thread::wait(1.0); 00021 //T.attach(&angle,&ANGLE::set_angle,0.001); 00022 while(1) 00023 { 00024 //gyro.get_rate(g,g+1,g+2); 00025 angle.get_Comp_angle(g,g+1); 00026 pc.printf("%lf, %lf, %lf\n", g[0], g[1], g[2]); 00027 00028 } 00029 } 00030 00031
Generated on Wed Jul 13 2022 23:36:42 by
1.7.2