Cortex Challenge Team / Mbed 2 deprecated Nucleo-Analog_read

Dependencies:   mbed

Revision:
4:465abf12c950
Parent:
3:1310ff1cdc7b
Child:
5:1083b6d9b4ff
--- a/main.cpp	Sat Mar 21 14:51:32 2015 +0000
+++ b/main.cpp	Sun Mar 22 12:35:38 2015 +0000
@@ -1,8 +1,8 @@
 /**********************************************************************************
 * @file    main.cpp
-* @author  Name
-* @version V0.1
-* @date    09-March-2015
+* @author  Petr Dousa
+* @version V1.00
+* @date    22-March-2015
 * @brief   Read analog value and send it to serial.
 *          Serial speed is set to 115200.
 ***********************************************************************************/
@@ -34,6 +34,10 @@
 #define mv2(x)       ((x*voltage)/0xFFFF)
 #define mv3(x)       (x*voltage)
 
+/* Function prototypes -----------------------------------------------------------*/
+
+/* Variables ---------------------------------------------------------------------*/
+
 //mbed - initialization of peripherals
 AnalogIn analog_value(A0);          // inicialize analog read from A0
 DigitalOut led(LED1);               // inicialize LED
@@ -50,12 +54,12 @@
 ***********************************************************************************/
 int main()
 {
-    pc.baud(115200);    //set speed of serial to 115200
 
     float meas1;
     int meas2;
     float meas3;
-
+    
+    pc.baud(115200);    //set speed of serial to 115200
     pc.printf("\nAnalogIn example\n");
 
     while(1) {