hallo SlyD,
es kommt nicht immer nur die 49 raus. Ich wollte nur bei dem Beispiel bleiben. Beim eingeben von 21 oder 22 ...29 kommt die 50 raus. und genaus so für die 3x kommt die 51 raus.
hier ist das komplete code
Code:
#include "RP6RobotBaseLib.h" 	
#define bytesToReceive 			1

char receiveBuffer[bytesToReceive];
uint8_t TargetPosition;
		
int main(void)
{
	initRobotBase(); // Always call this first! The Processor will not work
					 // correctly otherwise.

	setLEDs(0b111111); // Turn all LEDs on
	mSleep(500);       // delay 500ms
	setLEDs(0b000000); // All LEDs off

	while(true)
	{
		writeString_P("\n please Target position:   ");
		receiveBytesToBuffer(bytesToReceive,&receiveBuffer[0]);
		TargetPosition=(uint8_t)receiveBuffer[0];
	
		writeString_P("\n Target position is:   ");
	
		writeInteger(TargetPosition,DEC);
		
	}
	
	return 0;
}
ich werde aber die neue Lib runterladen und testen. Danke.