2020_CEES_Model_Rocket
/
IM920_sample3
2020/08/19
Revision 2:dfaf7126cf6b, committed 2020-08-19
- Comitter:
- falconsyunya
- Date:
- Wed Aug 19 04:10:52 2020 +0000
- Parent:
- 1:0deed3031dfc
- Commit message:
- 2020/08/19
Changed in this revision
--- a/IM920.lib Thu Jan 08 13:28:36 2015 +0000 +++ b/IM920.lib Wed Aug 19 04:10:52 2020 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/okini3939/code/IM920/#db269462ad1c +http://developer.mbed.org/users/okini3939/code/IM920/#2fd9b1725283
--- a/main.cpp Thu Jan 08 13:28:36 2015 +0000 +++ b/main.cpp Wed Aug 19 04:10:52 2020 +0000 @@ -3,7 +3,7 @@ DigitalOut myled(LED1); Serial pc(USBTX, USBRX); -IM920 im920(p28, p27, p29, p30); +IM920 im920(PA_2,PA_3,PA_0,PA_1);//tx, rx, busy, reset void callback () { int i; @@ -18,27 +18,18 @@ int i = 0; char buf[65]; - pc.baud(115200); + pc.baud(19200); pc.printf("*** IM920\r\n"); im920.init(); im920.attach(callback); myled = 1; + + for(i=0;i<64;i++){//bufにとりあえず値を入れてみる + buf[i]=i; + } + + //im920.poll(); + printf("send: %s\r\n", buf);//送信データの確認 + im920.send(buf,i);//データ送信 - for (;;) { - im920.poll(); - if (pc.readable()) { - char c = pc.getc(); - if (c == '\r') { - buf[i] = 0; - printf("send: %s\r\n", buf); - im920.send(buf, i); - i = 0; - } else - if (i < 64) { - buf[i] = c; - i ++; - } - } - } } -
--- a/mbed.bld Thu Jan 08 13:28:36 2015 +0000 +++ b/mbed.bld Wed Aug 19 04:10:52 2020 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5 \ No newline at end of file +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file