Continuously vary LED brightness between completely dark and fully lite.
Diff: Glowing.cpp
- Revision:
- 1:eef7593bdcc5
- Parent:
- 0:26c09c4aba81
--- a/Glowing.cpp Wed Dec 29 03:32:39 2010 +0000 +++ b/Glowing.cpp Thu Dec 30 04:22:45 2010 +0000 @@ -7,9 +7,8 @@ s_port = new PwmOut(pin); s_steps = steps; s_step_offset = offset; - c_circle = 2*acos(-1.0); // 2 PI c_step_time = period/steps; - c_step_gradient = c_circle/steps; + c_step_gradient = 2*acos(-1.0)/steps; // 2 PI/steps s_running = false; }