Display
Dependencies: Convert SLCD mbed
main.cpp
00001 #include "mbed.h" 00002 #include "convert.h" 00003 00004 PwmOut r(LED_RED); 00005 PwmOut g(LED_GREEN); 00006 00007 int main() 00008 { 00009 r.period(0.001f); 00010 g.period(0.001f); 00011 Convert lcd; 00012 lcd.display(9999); 00013 00014 while (true) { 00015 00016 /*for (float i = 0.0f; i < 1.0f ; i += 0.001f) { 00017 float p = 3 * i; 00018 r = 1.0f - ((p < 1.0f) ? 1.0f - p : (p > 2.0f) ? p - 2.0f : 0.0f); 00019 g = 1.0f - ((p < 1.0f) ? p : (p > 2.0f) ? 0.0f : 2.0f - p); 00020 wait (0.0025f); 00021 }*/ 00022 } 00023 }
Generated on Sun Jul 24 2022 06:07:37 by 1.7.2