kiban honpo
/
CDS
光センサ
Fork of CDS_LCD by
Revision 0:48b9e99fafc8, committed 2013-05-23
- Comitter:
- MasudaToshio
- Date:
- Thu May 23 10:06:07 2013 +0000
- Commit message:
- ????
Changed in this revision
diff -r 000000000000 -r 48b9e99fafc8 TextLCD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Thu May 23 10:06:07 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
diff -r 000000000000 -r 48b9e99fafc8 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu May 23 10:06:07 2013 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" +#include "TextLCD.h" + +AnalogIn CDS(p16); +TextLCD lcd(p24, p26, p27, p28, p29, p30); + +///////////////////////////////////////////////////// +// main +///////////////////////////////////////////////////// +int main(void) { + float a_in , t_cds ; + lcd.cls(); + + while(1) { + a_in = ( CDS ); + + t_cds = ( 2.7 * exp( a_in ) + ( -2.55 ) ) ; + t_cds = pow( 10 , t_cds ) ; + + lcd.locate(0,0); + lcd.printf("%3.0F lx %5.3F V", t_cds, a_in); + wait(.5); + } + + return 0; +} \ No newline at end of file
diff -r 000000000000 -r 48b9e99fafc8 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu May 23 10:06:07 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/10b9abbe79a6 \ No newline at end of file