DipCortex - Read 7 Analog channels and stream the data over USB CDC

Dependencies:   USBDevice mbed

Fork of DipCortex-ADC-USB by Carl - SolderSplash Labs

Read 7 analog channels and stream the results over a USB CDC connection. Using the DIpCortex

http://www.soldersplash.co.uk

Files at this revision

API Documentation at this revision

Comitter:
SolderSplashLabs
Date:
Sat Nov 02 12:45:55 2013 +0000
Parent:
0:21219957a1ae
Commit message:
Switched to NXP pin naming, so that the example works with both the DipCortex M3 and M0 mbed libraries

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 21219957a1ae -r ec3a6a7c1aba main.cpp
--- a/main.cpp	Sat Nov 02 12:22:33 2013 +0000
+++ b/main.cpp	Sat Nov 02 12:45:55 2013 +0000
@@ -8,13 +8,13 @@
 USBSerial pc;
 
 // Configure the Analogue pins of the DipCortex
-AnalogIn adc0(p2);
-AnalogIn adc1(p3);
-AnalogIn adc2(p4);
-AnalogIn adc3(p5);
-AnalogIn adc5(p8);
-AnalogIn adc6(p9);
-AnalogIn adc7(p10);
+AnalogIn adc0(P0_11); //P2
+AnalogIn adc1(P0_12); //P3
+AnalogIn adc2(P0_13); //P4
+AnalogIn adc3(P0_14); //P5
+AnalogIn adc5(P0_16); //P8
+AnalogIn adc6(P0_22); //P9
+AnalogIn adc7(P0_23); //P10
 
 int main()
 {