Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BufferedSerial MODSERIAL mbed
Revision 0:fa959cfb1d04, committed 2016-10-21
- Comitter:
- na1203132
- Date:
- Fri Oct 21 17:35:00 2016 +0000
- Commit message:
- hh
Changed in this revision
diff -r 000000000000 -r fa959cfb1d04 BufferedSerial.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BufferedSerial.lib Fri Oct 21 17:35:00 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/sam_grove/code/BufferedSerial/#a0d37088b405
diff -r 000000000000 -r fa959cfb1d04 MODSERIAL.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MODSERIAL.lib Fri Oct 21 17:35:00 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/AjK/code/MODSERIAL/#ae0408ebdd68
diff -r 000000000000 -r fa959cfb1d04 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Oct 21 17:35:00 2016 +0000 @@ -0,0 +1,64 @@ +#include "mbed.h" +#include "BufferedSerial.h" +Serial pc(USBTX,USBRX); +BufferedSerial BP(p13,p14); + + + + +int main() { + + BP.baud(9600); + BP.format(8,SerialBase::None,2); + + while(1) + { + + const char wakeup[]={0x55}; + const char commUp[] = {0x2, 0x43, 0x50, 0x43, 0x30, 0x35, 0x3B}; + const char measure[] = {0x02, 0x43, 0x50, 0x43, 0x34, 0x30, 0x3A}; + char record[8]; + char record2[8]; + + if (BP.writeable()) + BP.write(wakeup,sizeof(wakeup)); + wait(1); + + + record[1]=BP.getc(); + pc.printf("First Command Byte Response: %x \n\r",record[1]); + wait(1); + pc.printf("\e[1;1H\e[2J"); + + + + if (BP.writeable()) + BP.write(commUp,sizeof(commUp)); + + wait(5); + + for(int i=0;i<=7;i++) { + record[i]=BP.getc(); + pc.printf("commUP Command Response: %x \n\r",record[i]); } + + if (BP.writeable()) + BP.write(measure,sizeof(measure)); + + wait(3); + + for(int i=0;i<=7;i++) { + record2[i]=BP.getc(); + pc.printf("measure Command Response: %x \n\r",record2[i]); } + + + + + + + + } + + + + +} \ No newline at end of file
diff -r 000000000000 -r fa959cfb1d04 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Oct 21 17:35:00 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file