ECE 4333 / ECE4333Lab2

Dependencies:   mbed

Revision:
2:5f6ac2ea5870
Parent:
1:127190419363
Child:
3:d3a088bc04e7
--- a/main.cpp	Fri Jan 22 19:55:41 2016 +0000
+++ b/main.cpp	Fri Jan 22 20:00:25 2016 +0000
@@ -2,12 +2,17 @@
 //#include "InterruptIn.h"
 //#include "Serial.h"
 
-//Declarations
+//DECLARATIONS
 Serial pc(USBTX, USBRX);
 //Digital Inputs
 DigitalIn testIn(p25); 
 //Digital Outputs
 DigitalOut testOut(LED1);
+//Analog Inputs
+AnalogIn AIn(p26);
+//Analog Outputs
+AnalogOut AOut(p27);
+
 
 char DisplayMenu(void){
 char Key;
@@ -54,7 +59,7 @@
 printf("\n\r-------------------------------------");
 printf("\r\nPressed Key = %C",Key);
 printf("\n\r-------------------------------------");
-return(Key);
+AOut.write(Key);
     }
     
 int fAnalogIn(){//read the analog values at two analog input pins and display the converted