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.
Dependencies: mbed
Fork of CDS_HelloWorld_WIZwiki-W7500 by
main.cpp
- Committer:
- joon874
- Date:
- 2015-07-10
- Revision:
- 3:b4272b24707b
- Parent:
- 0:fe7126797254
- Child:
- 4:9866fbe66750
File content as of revision 3:b4272b24707b:
#include "mbed.h" DigitalOut redled(LED1); // RED DigitalOut blueled(LED3); // BLUE AnalogIn CDS(A0); int main() { printf("Hello WizWIki-W7500!\n\r"); printf("===========================================\n\r"); int CDS_data = 0; double CDS_vol = 0; while(1) { CDS_data = CDS.read()*1000; CDS_vol = CDS.read()*3.3; //CDS Seneor ADC Low Data printf("CDS Data : %3d\r\n",CDS_data); //CDS Sensor Voltage data printf("CDS Voltage : %3.3lfV\r\n",CDS_vol); printf("===========================================\n\r"); wait(1); //Status is bright. if(CDS_data < 500){ redled = 1; blueled = 0; } //Status is dark. else { redled = 0; blueled = 1; } } }