Bertl 2014 Übung
Dependencies: mbed
Fork of _B14Test4 by
main.cpp@0:f94a04d3cabd, 2014-11-13 (annotated)
- Committer:
- Enenkel
- Date:
- Thu Nov 13 18:20:22 2014 +0000
- Revision:
- 0:f94a04d3cabd
- Child:
- 1:990f1662c0d1
LINE Sensor
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Enenkel | 0:f94a04d3cabd | 1 | /*********************************** |
Enenkel | 0:f94a04d3cabd | 2 | name: BERTL_2014_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 | 0:f94a04d3cabd | 7 | den LED D10 - D13 zugeordnet |
Enenkel | 0:f94a04d3cabd | 8 | ***********************************/ |
Enenkel | 0:f94a04d3cabd | 9 | #include "mbed.h" |
Enenkel | 0:f94a04d3cabd | 10 | // ************ DEKLARATIONEN ************** |
Enenkel | 0:f94a04d3cabd | 11 | BusIn linesensor(p18, p16, p19, p17); //Einlesen der Linesensoren |
Enenkel | 0:f94a04d3cabd | 12 | BusOut leds(LED1, LED2, LED3, LED4); //LEDS als Bus definieren |
Enenkel | 0:f94a04d3cabd | 13 | |
Enenkel | 0:f94a04d3cabd | 14 | //************* HAUPTPROGRAMM ************* |
Enenkel | 0:f94a04d3cabd | 15 | int main() { |
Enenkel | 0:f94a04d3cabd | 16 | |
Enenkel | 0:f94a04d3cabd | 17 | while(1) { |
Enenkel | 0:f94a04d3cabd | 18 | leds = linesensor; //die line Sensoren den LEDs zuordnen |
Enenkel | 0:f94a04d3cabd | 19 | } |
Enenkel | 0:f94a04d3cabd | 20 | |
Enenkel | 0:f94a04d3cabd | 21 | } |
Enenkel | 0:f94a04d3cabd | 22 | //***************** ENDE ******************* |
Enenkel | 0:f94a04d3cabd | 23 |