LINE SENSOR TEST
Dependencies: mbed
Fork of _B14Test4 by
main.cpp@1:990f1662c0d1, 2015-01-25 (annotated)
- Committer:
- Enenkel
- Date:
- Sun Jan 25 17:28:16 2015 +0000
- Revision:
- 1:990f1662c0d1
- Parent:
- 0:f94a04d3cabd
- Child:
- 2:d8bf32dd10e4
Line Sensor Test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Enenkel | 0:f94a04d3cabd | 1 | /*********************************** |
Enenkel | 1:990f1662c0d1 | 2 | name: BERTL_2014_TEST Line Sensor Test |
Enenkel | 0:f94a04d3cabd | 3 | author: Gottfried Enenkel HTL BULME |
Enenkel | 0:f94a04d3cabd | 4 | email: ene@bulme.at |
Enenkel | 0:f94a04d3cabd | 5 | description: |
Enenkel | 0:f94a04d3cabd | 6 | Die 4 LINE Sensoren werden direkt |
Enenkel | 1:990f1662c0d1 | 7 | den LED D10 - D13 zugeordnet |
Enenkel | 1:990f1662c0d1 | 8 | |
Enenkel | 1:990f1662c0d1 | 9 | Durch abdecken der Sensoren mit dem Finger |
Enenkel | 1:990f1662c0d1 | 10 | leuchten die jeweils zugeordneten LED's |
Enenkel | 0:f94a04d3cabd | 11 | ***********************************/ |
Enenkel | 0:f94a04d3cabd | 12 | #include "mbed.h" |
Enenkel | 0:f94a04d3cabd | 13 | // ************ DEKLARATIONEN ************** |
Enenkel | 1:990f1662c0d1 | 14 | BusIn linesensor(P0_14, P0_12, P0_16, P0_13); //Einlesen der Linesensoren |
Enenkel | 1:990f1662c0d1 | 15 | BusOut leds(P1_8, P1_9, P1_10, P1_11); //LEDS als Bus definieren |
Enenkel | 0:f94a04d3cabd | 16 | |
Enenkel | 0:f94a04d3cabd | 17 | //************* HAUPTPROGRAMM ************* |
Enenkel | 0:f94a04d3cabd | 18 | int main() { |
Enenkel | 0:f94a04d3cabd | 19 | while(1) { |
Enenkel | 1:990f1662c0d1 | 20 | leds = linesensor; //die line Sensoren den LEDs zuordnen |
Enenkel | 0:f94a04d3cabd | 21 | } |
Enenkel | 0:f94a04d3cabd | 22 | } |
Enenkel | 0:f94a04d3cabd | 23 | //***************** ENDE ******************* |
Enenkel | 0:f94a04d3cabd | 24 |