Stefan Krickl / Mbed 2 deprecated JetflyerMotorController

Dependencies:   Break Motor Communication Steering mbed Controller

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers save.h Source File

save.h

00001 /create instances
00002     //Controller controller; 
00003     //controller_timer.attach(&timer_interrupt_controller, 0.1);
00004     //MbedToPC test(p9, p10, 115200);
00005     //MotorController test1(p28, p27, 115200);
00006     //test.enableInterrupt();
00007     //test.writeLine("Hello World");
00008     
00009     //test1.writeLine("help");
00010     //initMotorController();
00011     
00012     //test.writeLine("hallo welt");
00013     //test1.writeWord("status_start\r\n");
00014     
00015     /*SerialController com(p9, p10, p28, p27, 115200);
00016     
00017     
00018     led3 = 1;
00019     com.getMotorControllerReady();
00020     led3 = 0;
00021     
00022     com.enableInterrupt();
00023     com.startStatus();
00024     
00025     //com.init();
00026     
00027     string line;
00028     
00029         
00030         led1 = 1;
00031         led2 = 1;
00032 
00033         wait(1);
00034         //led2 = 0;
00035     
00036     while (1)
00037     {  
00038         
00039    
00040         /*led3 = 1;
00041         line = test1.readLine();
00042         
00043         wait(0.5);
00044         led3 = 0;
00045         led2 = 1;
00046         test.writeLine(line);*/
00047         
00048         
00049         
00050         
00051         //string line = test1.readLine();
00052         
00053         //test.writeLine(line);
00054         /*Test.writeLine("Test read char");
00055         char word[1];
00056         word[0] = Test.readChar();
00057         Test.writeLine(word);*/
00058         /*Test.writeLine("Test read line");
00059         string line = Test.readLine();*/
00060         /*std::size_t found = myLine.find("stop");
00061         if (found!=std::string::npos)
00062         {
00063             Test.disableInterrupt();
00064             myLine = "ended!!";
00065         }
00066         Test.writeLine(myLine);*/
00067         
00068         
00069         //led1 = !led1;
00070         //led2 = !led2;
00071         
00072         
00073        /* wait(1);
00074         led1 = !led1;
00075         led2 = !led2;
00076     }*/