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: mbed
Revision 2:2d54c60eef4c, committed 2018-12-17
- Comitter:
- isshikiyuya
- Date:
- Mon Dec 17 05:36:37 2018 +0000
- Parent:
- 1:395831e5d094
- Commit message:
- a
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Dec 14 06:22:54 2018 +0000 +++ b/main.cpp Mon Dec 17 05:36:37 2018 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" -InterruptIn button1(A1); //フォトインタラプタ -InterruptIn button2(A2); //フォトインタラプタ +InterruptIn button1(A2); //フォトインタラプタ +InterruptIn button2(A1); //フォトインタラプタ int count1 = 0; @@ -34,13 +34,13 @@ while(1) { - dout1.write(0.5f); //50% duty - dout5.write(0.4f); //50% duty - dout6.write(0.2f); //50% duty - dout9.write(0.6f); //50% duty + dout1.write(0.5f); // duty + dout5.write(0.4f); // duty + dout6.write(0.2f); // duty + dout9.write(0.6f); // duty - printf("%d\n",count1); - printf("%d\n\n",count2); + printf("左%d\n",count1); + printf("右%d\n\n",count2); count1 = 0; count2 = 0; wait(1);