PWM出力サンプルプログラム mbedセミナー演習ex

Dependencies:   mbed

Committer:
jksoft
Date:
Fri Aug 26 15:40:10 2011 +0000
Revision:
0:a17b1b1599ef

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 0:a17b1b1599ef 1 #include "mbed.h"
jksoft 0:a17b1b1599ef 2
jksoft 0:a17b1b1599ef 3 PwmOut led(LED1);
jksoft 0:a17b1b1599ef 4
jksoft 0:a17b1b1599ef 5 int main() {
jksoft 0:a17b1b1599ef 6 while(1) {
jksoft 0:a17b1b1599ef 7 for(float p = 0.0f; p < 1.0f; p += 0.1f) {
jksoft 0:a17b1b1599ef 8 led = p;
jksoft 0:a17b1b1599ef 9 wait(0.1);
jksoft 0:a17b1b1599ef 10 }
jksoft 0:a17b1b1599ef 11 }
jksoft 0:a17b1b1599ef 12 }