![](/media/cache/profiles/e1f5448f160187bcb4c4acaacfb3456c.50x50_q85.jpg)
illuminance.
main.cpp@0:e7c1cda5f649, 2012-10-11 (annotated)
- Committer:
- AkiraK
- Date:
- Thu Oct 11 15:47:23 2012 +0000
- Revision:
- 0:e7c1cda5f649
illuminance.;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AkiraK | 0:e7c1cda5f649 | 1 | #include "mbed.h" |
AkiraK | 0:e7c1cda5f649 | 2 | |
AkiraK | 0:e7c1cda5f649 | 3 | AnalogIn illu(p20); |
AkiraK | 0:e7c1cda5f649 | 4 | |
AkiraK | 0:e7c1cda5f649 | 5 | int main() { |
AkiraK | 0:e7c1cda5f649 | 6 | while(true) { |
AkiraK | 0:e7c1cda5f649 | 7 | float lx = illu * 3.3 / 3 * 1000; |
AkiraK | 0:e7c1cda5f649 | 8 | printf("%5.2f\r\n", lx); |
AkiraK | 0:e7c1cda5f649 | 9 | wait(1.0); |
AkiraK | 0:e7c1cda5f649 | 10 | } |
AkiraK | 0:e7c1cda5f649 | 11 | } |