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
Diff: main.cpp
- Revision:
- 5:4b409c37e81f
- Parent:
- 3:017c85c4b14b
--- a/main.cpp Sat May 13 13:53:16 2017 +0000
+++ b/main.cpp Sun May 14 14:56:24 2017 +0000
@@ -33,21 +33,22 @@
Servo ServoAusw(PB_7);
Servo ServoFoerder(PC_7);
//Lift
-Servo ServoLift(PA_6);
+Servo ServoLift(PB_6);
//Serielle Ausgabe
Serial pc(SERIAL_TX,SERIAL_RX);
Farbauswertung farbauswertung(&SensorG, &SensorR, &ServoAusw);
Fahren fahren(&enable, &bit0, &bit1, &bit2, &distance, &enableMotorDriver, &pwmLeft, &pwmRight);
-LiftAnsteuerung lift(30, 5, &ServoLift);
+LiftAnsteuerung lift(100, 10, &ServoLift);
int main()
{
farbauswertung.setSerialOutput(&pc);
fahren.setSerialOutput(&pc);
+ lift.setSerialOutput(&pc);
- ServoLift = 1.2f; //1.2
+ ServoLift = 0.7f; //1.2
ServoFoerder = 0.1f; //0.1
fahren.fahrInit();
@@ -58,8 +59,8 @@
Ticker drive;
drive.attach(&fahren, &Fahren::fahrRutine, 0.01);
- // Ticker elevator;
- // elevator.attach(&lift, &LiftAnsteuerung::steuerung, 0.5);
+ Ticker elevator;
+ elevator.attach(&lift, &LiftAnsteuerung::steuerung, 0.01);
while (1) {