set speed

This commit is contained in:
Harald Pichler 2017-07-20 17:00:16 +02:00
parent 38430ac259
commit a6670d99a8

View file

@ -93,6 +93,7 @@ void loop (void)
speed = (1023-sensorValue2) >> 2; speed = (1023-sensorValue2) >> 2;
IN3_L; IN4_H; analogWrite(BB_Enable_B, speed); IN3_L; IN4_H; analogWrite(BB_Enable_B, speed);
analogWrite(led_pin, speed);
printf("x: %d , y: %d bar: %d speed: %d\n",sensorValue1 ,sensorValue2, vbar, speed); printf("x: %d , y: %d bar: %d speed: %d\n",sensorValue1 ,sensorValue2, vbar, speed);