Alejandro M
/
Tutoelectro_Timer_Ticker
Tutoelectro Tutorial Timer Ticker FRDM-KL25Z
Diff: main.cpp
- Revision:
- 1:c79012330a03
- Parent:
- 0:21f9d8d60953
--- a/main.cpp Fri Feb 06 15:22:39 2015 +0000 +++ b/main.cpp Sat Mar 07 15:17:21 2015 +0000 @@ -18,7 +18,7 @@ pwm1 += 0.01; ledR = pwm1; - if( pwm1 == 1) { + if( pwm1 >= 1) { pwm1 =0; } @@ -31,7 +31,7 @@ pwm2 += 0.01; ledA = pwm2; - if( pwm2 == 1) { + if( pwm2 >= 1) { pwm2 = 0 ; } @@ -42,8 +42,8 @@ { pc.baud(115200); timer1.start(); - ticker1.attach(&led1,0.5); - ticker2.attach(&led2,1); + ticker1.attach(&led1,0.1); + ticker2.attach(&led2,0.5); while(1) { }