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:
- yokotay
- Date:
- 2018-07-27
- Revision:
- 3:49bf69fdf479
- Parent:
- 2:51cd5763b12f
- Child:
- 4:af3ab563a296
File content as of revision 3:49bf69fdf479:
#include "mbed.h" PwmOut led(dp24); // dp24ピンをPWM出力として利用、led変数に割当 int main() { // specify period first led.period(2.0f); // PWM周期を4秒に設定 led.write(0.50f); // デューティー比を 50% に設定(つまり2秒点灯・2秒消灯の繰り返し) while(1); // 「何もしない」状態を無限に繰り返す → 上記で設定したPWM制御の状態がずっと続く }