Also ich finde nicht das Problem ich stelle mal den ganze Qulltext rein ist ja nicht so interressant:
Code:
#include "RP6RobotBaseLib.h"
uint8_t ok=0;

void senkrecht (void)
{
	writeString_P("achtung");	
	stop();
	task_motionControl();
	while(ok == 0) //nicht wundern das die schleife nie endet
	{
		statusLEDs.LED5 = obstacle_left;	//Hinderniss Links
		statusLEDs.LED2 = obstacle_right; //Hinderniss rechts
		updateStatusLEDs();		
	}
}

int main(void)
{
	initRobotBase();
	powerON();
	setACSPwrHigh();
	
	moveAtSpeed(100,150);	//erste Bewegung
	startStopwatch1();	//Zeitnhemer bis andere Richtung
	
	while(true)	
	{
		task_motionControl();
		task_ACS();
		if (getStopwatch1() >= 3000)	//rechts herum
		{
			stopStopwatch1();
			moveAtSpeed(150,100);
			setStopwatch1(0);
			startStopwatch2();
		}
		if (getStopwatch2() >= 3000)	//links herum
		{
			stopStopwatch2();
			moveAtSpeed(100,150);
			setStopwatch2(0);
			startStopwatch1();
		}
		if (obstacle_left || obstacle_right)
		{
			senkrecht();
		}
	}
	return 0;
}
Also bitte nicht wundern, dass die eine Schleife nie endet, da wird später noch weiter gemacht, dass der Roboter sich senkrecht zur Wand ausrichtet.
Das Schlengellienienfahren bewirkt das ein größerer Bereich gemessen wird.
Stratege993