Lin ShengKun / Mbed OS NYP_FYP

Dependencies:   LSM6DSL

Fork of humanoid by Junjie Wang

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "rtos.h"
00003 //#include "kondo1.h"
00004 #include "kondo2.h"
00005 //#include "kondo3.h"
00006 #include "servo.h"
00007 #include "accgyro.h"
00008 DigitalOut led2(LED2);
00009 Thread event_thread;
00010 Thread ACCGYRO_thread;
00011 //Thread KONDO1_thread;
00012 Thread KONDO2_thread;
00013 //Thread KONDO3_thread;
00014 //Thread KONDO1_Degrees_Set_thread;
00015 Thread KONDO2_Degrees_Set_thread;
00016 //Thread KONDO3_Degrees_Set_thread;
00017 EventQueue event_queue;
00018 int main()
00019 {   
00020     ACCGYRO_thread.start(ACCGYRO_init);
00021 //    KONDO1_thread.start(KONDO1_init);
00022     KONDO2_thread.start(KONDO2_init);
00023 //    KONDO3_thread.start(KONDO3_init);
00024 //    KONDO1_Degrees_Set_thread.start(KONDO1_Degrees_Set);
00025     KONDO2_Degrees_Set_thread.start(KONDO2_Degrees_Set);
00026 //    KONDO3_Degrees_Set_thread.start(KONDO3_Degrees_Set);
00027     while(1)
00028     {
00029         led2 = !led2;
00030         wait(1);
00031     }
00032 }