Riad_ Bajraktarevic
/
NightRider
09_12_19
main.cpp
- Committer:
- riad
- Date:
- 2019-12-09
- Revision:
- 0:52e07f851640
File content as of revision 0:52e07f851640:
#include "mbed.h" PwmOut myled(p23); int main() { myled.period(0.01f); myled = 0.0f; while(1) { for(float i = 0.0f; i<1.0f ; i += 0.03f) { myled = i; wait(0.03f); } for(float i = 1.0f; i>0.0f ; i -= 0.03f) { myled = i; wait(0.03f); } } }