Skip to content

Commit 86a10a5

Browse files
committed
slower forward so the turn correction is tight
1 parent 2f4bfce commit 86a10a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ArduinoClassRobot.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public:
3838
double currentRotationZ=0;
3939
double rotZIncrement=1.2;
4040
double kp=0.01;
41-
double fwdConstant=25;
41+
double fwdConstant=15;
4242
double resetTarget=0;
4343
int lval ;
4444
int rval ;
@@ -113,7 +113,7 @@ void setup() {
113113
void loop() {
114114

115115
float x = -fmap(nunchuck.values[1], 0, 255, -1.0, 1.0);
116-
float y = -fmap(nunchuck.values[0], 0, 255, -1.0, 1.0);
116+
float y = fmap(nunchuck.values[0], 0, 255, -1.0, 1.0);
117117
puppy.setTargets(x, y,bno.orientationZ);
118118
if(nunchuck.values[11]>0){
119119
puppy.rotZTarget = puppy.resetTarget;

0 commit comments

Comments
 (0)