![](/media/cache/profiles/b67245cccae7128e11b41880910d4fd0.jpg.50x50_q85.png)
Nucleo_ADC
Revision 0:b3f45f22272f, committed 2015-12-11
- Comitter:
- anoney180133
- Date:
- Fri Dec 11 14:20:22 2015 +0000
- Commit message:
- 1
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r b3f45f22272f main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Dec 11 14:20:22 2015 +0000 @@ -0,0 +1,28 @@ +#include "mbed.h" + +//------------------------------------ +// Hyperterminal configuration +// 115200 bauds(Default 9600), 8-bit data, no parity +//------------------------------------ +/* No need Serial to UART just usb debugger. */ + +Serial UART(SERIAL_TX, SERIAL_RX); // TX PA_2 , RX PA_3 + +AnalogIn ADC_Channel0(PA_0); +AnalogIn ADC_Channel1(PA_1); + + +void UARTIrq(); + + +int main() +{ + UART.baud(115200); // Set BuadRate + printf("Read ADC Testing.\r\n"); + while(1) + { + wait_ms(250); + printf("ADC1_IN0(A0) = %d , ADC1_IN1(A1) = %d \r\n", ADC_Channel0.read_u16(),ADC_Channel1.read_u16()); + } +} + \ No newline at end of file
diff -r 000000000000 -r b3f45f22272f mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Dec 11 14:20:22 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file