Matlab connection via the serial port, to control the robot from there (interactively)
Diff: example.cpp
- Revision:
- 3:4fd668c1dbf5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example.cpp Tue Nov 01 02:36:29 2016 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" +#include "MatlabComm.h" + +MatlabComm MyComm(D4, D5, D12, D13); + +Ticker MyTest; + +double test_rate = 0.01; + + +bool flag1 = false; +void test(){ + flag1=true; +} + +int main() +{ + MyTest.attach(&test, test_rate); + while (true) { + if (flag1){ + flag1=false; + MyComm.Step(); + } + } +} \ No newline at end of file