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 LDR(p16); 00004 BusOut myled(P1_13,P1_12,P1_7,P1_6,P1_4,P1_3,P1_1,P1_0,LED4,LED3,LED2,LED1); 00005 Serial pc(USBTX, USBRX); 00006 00007 int main() 00008 { 00009 while(1) 00010 { 00011 myled=LDR.read_u16()/65; // 2^16 durch 10 00012 pc.printf("\r%u %f\n",(LDR.read_u16()/64), LDR.read()); 00013 wait(0.1); 00014 00015 switch (zahl) 00016 { 00017 case 1; 00018 myled = 1; 00019 case 2; 00020 myled = 3; 00021 case 3; 00022 myled = 7; 00023 case 4; 00024 myled = 15; 00025 case 5; 00026 myled = 31; 00027 case 6; 00028 myled = 63; 00029 case 7; 00030 myled = 127; 00031 case 8; 00032 myled = 255; 00033 case 9; 00034 myled = 511; 00035 case 10; 00036 myled = 1023; 00037 case 0; 00038 myled = 0; 00039 } 00040 }
Generated on Tue Jul 19 2022 02:04:00 by
1.7.2