NMLAB
/
MbedMATLABlink
for binary scan
Revision 0:c2886e9735cc, committed 2015-05-08
- Comitter:
- Dzak
- Date:
- Fri May 08 18:58:34 2015 +0000
- Commit message:
- Matlab Container
Changed in this revision
diff -r 000000000000 -r c2886e9735cc USBDevice.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/USBDevice.lib Fri May 08 18:58:34 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/USBDevice/#a0cd9646ecd1
diff -r 000000000000 -r c2886e9735cc main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 08 18:58:34 2015 +0000 @@ -0,0 +1,54 @@ +#include "mbed.h" +#include "USBSerial.h" + +USBSerial MATLAB; + +int main() + + { + -15351 + long tester_X = 5; + long tester_Y = -5; + long tester_Read = 2500; + char L_X, H_X, L_Y, H_Y, L_Z, H_Z, L_Read, H_Read; + + + while(1) + { + + + H_X = (char)((tester_X & 0xFFFF) >> 8); + L_X = (char)(tester_X & 0xFFFF); + + + H_Y = (char)((tester_Y & 0xFFFF) >> 8); + L_Y = (char)(tester_Y & 0xFFFF); + + H_Read = (char)((tester_Read & 0xFFFF) >> 8); + L_Read = (char)(tester_Read & 0xFFFF); + + + wait(0.5); + + + MATLAB.putc(H_X); + wait(0.1); + MATLAB.putc(L_X); + wait(0.1); + + + MATLAB.putc(H_Y); + wait(0.1); + MATLAB.putc(L_Y); + wait(0.1); + + + MATLAB.putc(H_Read); + wait(0.1); + MATLAB.putc(L_Read); + wait(0.1); + + } + + +}
diff -r 000000000000 -r c2886e9735cc mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri May 08 18:58:34 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058 \ No newline at end of file