en 129
/
FN-M16P
DFplayer再生テスト
Revision 0:7a74d794c54a, committed 2018-05-30
- Comitter:
- nameless129
- Date:
- Wed May 30 04:31:13 2018 +0000
- Commit message:
- play test
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 7a74d794c54a main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed May 30 04:31:13 2018 +0000 @@ -0,0 +1,28 @@ +#include "mbed.h" + +Serial pc(USBTX,USBRX); + +int main() { + char uartTXbuffer[10]; + int i; + pc.baud(9600); + + uartTXbuffer[0] = 0x7E; //Start Byte 0x7E + uartTXbuffer[1] = 0xFF; //version 0xFF by default + uartTXbuffer[2] = 0x06; //Length + uartTXbuffer[3] = 0x0D; //CMD 0x0D=Play + uartTXbuffer[4] = 0x00; //FeedBack 0=No need feedback. + uartTXbuffer[5] = 0x00; //Para_MSB + uartTXbuffer[6] = 0x00; //Para_LSB + uartTXbuffer[7] = 0xFE; //checksum H + uartTXbuffer[8] = 0xEE; //checksum L + uartTXbuffer[9] = 0xEF; //END byte 0xEF + + for(i=0;i<=10;i++) + { + pc.putc(uartTXbuffer[i]); + } + while(1) + { + } +}
diff -r 000000000000 -r 7a74d794c54a mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed May 30 04:31:13 2018 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/994bdf8177cb \ No newline at end of file