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: mbed
Fork of Roboshark_V5 by
Regler.h@7:862d80e0ea2d, 2018-05-04 (annotated)
- Committer:
- ahlervin
- Date:
- Fri May 04 16:26:59 2018 +0000
- Revision:
- 7:862d80e0ea2d
- Parent:
- 6:7bbcdd07bc2d
Mit Regler 2.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ahlervin | 7:862d80e0ea2d | 1 | /*Roboshark V5 |
ahlervin | 6:7bbcdd07bc2d | 2 | Regler.h |
ahlervin | 6:7bbcdd07bc2d | 3 | Erstellt: V.Ahlers |
ahlervin | 6:7bbcdd07bc2d | 4 | geändert: V.Ahlers |
ahlervin | 6:7bbcdd07bc2d | 5 | V.5.18 |
ahlervin | 6:7bbcdd07bc2d | 6 | */ |
ahlervin | 6:7bbcdd07bc2d | 7 | |
ahlervin | 6:7bbcdd07bc2d | 8 | #ifndef REGLER_H_ |
ahlervin | 6:7bbcdd07bc2d | 9 | #define REGLER_H_ |
ahlervin | 6:7bbcdd07bc2d | 10 | |
ahlervin | 6:7bbcdd07bc2d | 11 | #include <cstdlib> |
ahlervin | 6:7bbcdd07bc2d | 12 | #include <mbed.h> |
ahlervin | 7:862d80e0ea2d | 13 | #include "IRSensor.h" |
ahlervin | 6:7bbcdd07bc2d | 14 | |
ahlervin | 6:7bbcdd07bc2d | 15 | class Regler{ |
ahlervin | 6:7bbcdd07bc2d | 16 | |
ahlervin | 6:7bbcdd07bc2d | 17 | public: |
ahlervin | 7:862d80e0ea2d | 18 | Regler(AnalogIn& IrRight, AnalogIn& IrLeft, IRSensor& iRSensor); //Konstruktor |
ahlervin | 6:7bbcdd07bc2d | 19 | |
ahlervin | 6:7bbcdd07bc2d | 20 | virtual ~Regler(); |
ahlervin | 6:7bbcdd07bc2d | 21 | |
ahlervin | 6:7bbcdd07bc2d | 22 | |
ahlervin | 7:862d80e0ea2d | 23 | float getSpeedR(); |
ahlervin | 7:862d80e0ea2d | 24 | float getSpeedL(); |
ahlervin | 6:7bbcdd07bc2d | 25 | |
ahlervin | 6:7bbcdd07bc2d | 26 | private: |
ahlervin | 6:7bbcdd07bc2d | 27 | AnalogIn& IrRight; |
ahlervin | 6:7bbcdd07bc2d | 28 | AnalogIn& IrLeft; |
ahlervin | 7:862d80e0ea2d | 29 | IRSensor& iRSensor; |
ahlervin | 6:7bbcdd07bc2d | 30 | static const int FIXSPEED; |
ahlervin | 6:7bbcdd07bc2d | 31 | static const float PERIOD; |
ahlervin | 6:7bbcdd07bc2d | 32 | float SpeedR; |
ahlervin | 6:7bbcdd07bc2d | 33 | float SpeedL; |
ahlervin | 6:7bbcdd07bc2d | 34 | float measR2; |
ahlervin | 6:7bbcdd07bc2d | 35 | float measL2; |
ahlervin | 6:7bbcdd07bc2d | 36 | float div1; |
ahlervin | 6:7bbcdd07bc2d | 37 | float div2; |
ahlervin | 6:7bbcdd07bc2d | 38 | float div3; |
ahlervin | 6:7bbcdd07bc2d | 39 | float div4; |
ahlervin | 7:862d80e0ea2d | 40 | float div5; |
ahlervin | 7:862d80e0ea2d | 41 | float div6; |
ahlervin | 6:7bbcdd07bc2d | 42 | float kor1; |
ahlervin | 6:7bbcdd07bc2d | 43 | float kor2; |
ahlervin | 6:7bbcdd07bc2d | 44 | float kor3; |
ahlervin | 6:7bbcdd07bc2d | 45 | float kor4; |
ahlervin | 7:862d80e0ea2d | 46 | float kor5; |
ahlervin | 7:862d80e0ea2d | 47 | float kor6; |
ahlervin | 6:7bbcdd07bc2d | 48 | float faktor; |
ahlervin | 6:7bbcdd07bc2d | 49 | |
ahlervin | 6:7bbcdd07bc2d | 50 | |
ahlervin | 6:7bbcdd07bc2d | 51 | void setSpeed(); |
ahlervin | 6:7bbcdd07bc2d | 52 | Ticker ticker; |
ahlervin | 6:7bbcdd07bc2d | 53 | |
ahlervin | 6:7bbcdd07bc2d | 54 | }; |
ahlervin | 6:7bbcdd07bc2d | 55 | #endif |