BULME_AHEL18
/
Linesensor
Geben sie die werte der Linesensoren über serial aus
Revision 0:9c84c26ec646, committed 2015-06-18
- Comitter:
- lukas__27
- Date:
- Thu Jun 18 09:32:59 2015 +0000
- Commit message:
- Linesensor
Changed in this revision
diff -r 000000000000 -r 9c84c26ec646 BertlLib.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BertlLib.lib Thu Jun 18 09:32:59 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/hollegha2/code/BertlLib/#e0131e671ea0
diff -r 000000000000 -r 9c84c26ec646 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jun 18 09:32:59 2015 +0000 @@ -0,0 +1,28 @@ +#include "mbed.h" +#include "Serial_HL.h" +#include "Bertl14.h" +#include "BertlObjects.h" +#include "PwmOut.h" + +//Serial pc(USBTX, USBRX); // tx, rx +Serial pc(p9, p10); // tx, rx +AnalogIn linesensor1(P0_14); +AnalogIn linesensor2(P0_12); +AnalogIn linesensor3(P0_16); +AnalogIn linesensor4(P0_13); + +int main() +{ + double line1 = 0; + double line2 = 0; + double line3 = 0; + double line4 = 0; + while(1) { + line1 = linesensor1; + line2 = linesensor2; + line3 = linesensor3; + line4 = linesensor4; + pc.printf("%1.2f | %1.2f | %1.2f | %1.2f\r\n",line1, line2, line3, line4); + wait(0.5); + } +} \ No newline at end of file
diff -r 000000000000 -r 9c84c26ec646 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Jun 18 09:32:59 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/cbbeb26dbd92 \ No newline at end of file