Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Farbsensor IRSensorLib PID_Control Servo mbed PixyLib
Farbauswertung.h@3:017c85c4b14b, 2017-05-13 (annotated)
- Committer:
- schuema4
- Date:
- Sat May 13 12:52:51 2017 +0000
- Revision:
- 3:017c85c4b14b
- Parent:
- 1:5c44e2462a8b
- Child:
- 12:472b26872a42
stand 13.05.17_14:52
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ZHAW_Prometheus | 0:422088ad7fc5 | 1 | #ifndef FARBAUSW_H |
ZHAW_Prometheus | 0:422088ad7fc5 | 2 | #define FARBAUSW_H |
ZHAW_Prometheus | 0:422088ad7fc5 | 3 | |
ZHAW_Prometheus | 0:422088ad7fc5 | 4 | #include <mbed.h> |
ZHAW_Prometheus | 0:422088ad7fc5 | 5 | #include <cstdlib> |
ZHAW_Prometheus | 0:422088ad7fc5 | 6 | #include "Farbsensor.h" |
ZHAW_Prometheus | 0:422088ad7fc5 | 7 | #include "Servo.h" |
ZHAW_Prometheus | 0:422088ad7fc5 | 8 | |
ZHAW_Prometheus | 0:422088ad7fc5 | 9 | class Farbauswertung |
ZHAW_Prometheus | 0:422088ad7fc5 | 10 | { |
ZHAW_Prometheus | 0:422088ad7fc5 | 11 | public: |
ZHAW_Prometheus | 0:422088ad7fc5 | 12 | //Konstruktoren und Destruktoren |
ZHAW_Prometheus | 0:422088ad7fc5 | 13 | Farbauswertung(AnalogIn* SensorG, AnalogIn* SensorR, Servo* servoAusw); |
ZHAW_Prometheus | 0:422088ad7fc5 | 14 | Farbauswertung(); |
ZHAW_Prometheus | 0:422088ad7fc5 | 15 | virtual ~Farbauswertung(); |
ZHAW_Prometheus | 0:422088ad7fc5 | 16 | |
ZHAW_Prometheus | 0:422088ad7fc5 | 17 | //Public Methoden |
ZHAW_Prometheus | 0:422088ad7fc5 | 18 | void init(AnalogIn* SensorG, AnalogIn* SensorR, Servo* servoAusw); |
ZHAW_Prometheus | 0:422088ad7fc5 | 19 | void auswertung(); |
ZHAW_Prometheus | 0:422088ad7fc5 | 20 | void setSerialOutput(Serial *pc); |
ZHAW_Prometheus | 0:422088ad7fc5 | 21 | int getState(); |
ZHAW_Prometheus | 0:422088ad7fc5 | 22 | |
ZHAW_Prometheus | 0:422088ad7fc5 | 23 | private: |
ZHAW_Prometheus | 0:422088ad7fc5 | 24 | //Private Methoden |
ZHAW_Prometheus | 0:422088ad7fc5 | 25 | |
ZHAW_Prometheus | 0:422088ad7fc5 | 26 | //Private Eigenschaften |
ZHAW_Prometheus | 0:422088ad7fc5 | 27 | AnalogIn* SensorG; |
ZHAW_Prometheus | 0:422088ad7fc5 | 28 | AnalogIn* SensorR; |
ZHAW_Prometheus | 0:422088ad7fc5 | 29 | Servo* servoAusw; |
ZHAW_Prometheus | 0:422088ad7fc5 | 30 | |
schuema4 | 3:017c85c4b14b | 31 | int merker_rot, merker_rot1,merker_gruen; |
ZHAW_Prometheus | 1:5c44e2462a8b | 32 | int einschlatZeit; |
ZHAW_Prometheus | 1:5c44e2462a8b | 33 | int ausschaltZeit; |
ZHAW_Prometheus | 0:422088ad7fc5 | 34 | int zustand; |
ZHAW_Prometheus | 0:422088ad7fc5 | 35 | enum zustand {rot=0, gruen}; |
ZHAW_Prometheus | 0:422088ad7fc5 | 36 | Farbsensor farbsensor; |
ZHAW_Prometheus | 0:422088ad7fc5 | 37 | Serial *pc; |
ZHAW_Prometheus | 0:422088ad7fc5 | 38 | }; |
ZHAW_Prometheus | 0:422088ad7fc5 | 39 | |
ZHAW_Prometheus | 0:422088ad7fc5 | 40 | #endif |