Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 00003 AnalogIn illu(p15); 00004 DigitalOut myleds[] = {LED1, LED2, LED3, LED4}; 00005 float lx; 00006 00007 int main() 00008 { 00009 while(1) { 00010 lx = illu * 3.3 / 3 * 1000; 00011 float powr = 0 ; 00012 powr = (lx/100.0) * (4.0/11.0); 00013 00014 for(int i = 0; i < powr; i++) { 00015 myleds[i] = 1; 00016 } 00017 for(int i = powr ; i < 4; i++) { 00018 myleds[i] = 0; 00019 } 00020 } 00021 }
Generated on Wed Jul 13 2022 14:46:15 by
1.7.2