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
Diff: main.cpp
- Revision:
- 2:5f6ac2ea5870
- Parent:
- 1:127190419363
- Child:
- 3:d3a088bc04e7
diff -r 127190419363 -r 5f6ac2ea5870 main.cpp --- 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