ArmfulKST / Mbed 2 deprecated PE_05-04_LoggingData

Dependencies:   mbed

Fork of PE_05-04_LoggingData by Rob Toulson

Revision:
1:a8d819e5c10d
Parent:
0:ec4e2bc1996f
--- a/main.cpp	Mon Oct 15 21:18:35 2012 +0000
+++ b/main.cpp	Tue Nov 18 12:40:35 2014 +0000
@@ -2,16 +2,18 @@
                                                             */
 #include "mbed.h"
 Serial pc(USBTX, USBRX);               //enable serial port which links to USB
-AnalogIn Ain(p20);
+AnalogIn Ain(A0);
 
-float ADCdata;
-
+unsigned int ADCdata;
+float LightVolts;
 int main() {
   pc.printf("ADC Data Values...\n\r");   //send an opening text message
   while(1){
-    ADCdata=Ain;  
+    ADCdata=Ain.read_u16();  
+    //LightVolts=ADCdata*3.3;
     wait(0.5);  
-    pc.printf("%1.3f \n\r",ADCdata);   //send the data to the terminal
+//    pc.printf("%1.3f \n\r",LightVolts);   //send the data to the terminal
+   pc.printf("%x \n\r",ADCdata);   //send the data to the terminal
   }      
 }