Andrew Lindsay
/
Ciseco_LLAP_Test
Demo usage of LLAP library
Revision 0:95297d07b5c6, committed 2014-04-15
- Comitter:
- SomeRandomBloke
- Date:
- Tue Apr 15 22:14:11 2014 +0000
- Child:
- 1:808e9257d1ea
- Commit message:
- Example usage of LLAPSerial library
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LLAPSerial.lib Tue Apr 15 22:14:11 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/SomeRandomBloke/code/LLAPSerial/#8f3ec117823d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Apr 15 22:14:11 2014 +0000 @@ -0,0 +1,34 @@ +// Demo Ciseco LLAPSerial usage +#include "mbed.h" +#include "LLAPSerial.h" + +//LLAPSerial srf(PA_11, PA_12); +// or +LLAPSerial srf(PA_11, PA_12, "MB"); + +Serial pc(USBTX, USBRX); + +DigitalOut srfEnable(PA_9); + +int main() +{ + pc.baud(115200); + pc.printf("LLAP Test\n"); + + srfEnable = 1; + srf.sendMessage("STARTED"); + wait_ms(100); + srf.sendMessage("TMPA", "123"); + wait_ms(100); + srf.sendInt("TMPA", 123); + wait_ms(100); + srf.sendIntWithDP("TMPA", 1230,2); + while( 1 ) { + if( srf.bMsgReceived ) { + myled = !myled; + pc.printf("Received: %s\n\r",srf.sMessage ); + srf.bMsgReceived = false; // Clear flag to indicate msg handled + } + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Apr 15 22:14:11 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6473597d706e \ No newline at end of file