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
main.cpp
- Committer:
- isshikiyuya
- Date:
- 2018-12-13
- Revision:
- 0:53668fb4591a
- Child:
- 1:395831e5d094
File content as of revision 0:53668fb4591a:
#include "function.h" InterruptIn button1(A1); //フォトインタラプタ InterruptIn button2(A2); //フォトインタラプタ PwmOut dout1(D1); PwmOut dout5(D5); PwmOut dout6(D6); PwmOut dout9(D9); int main() { dout1.period(0.01f); //100Hz dout5.period(0.01f); //100Hz dout6.period(0.01f); //100Hz dout9.period(0.01f); //100Hz 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 printf("%d\n",count1); printf("%d\n\n",count2); count1 = 0; count2 = 0; wait(1); } }