Changes
Page history
Update
authored
Mar 02, 2015
by
HrNilsson
Show whitespace changes
Inline
Side-by-side
Lesson-3.markdown
View page @
f0cfc2a0
...
...
@@ -63,7 +63,7 @@ Note that the left sensor reading is calibrated, by subtracting 30 from the raw
This is done, in order for the sound sensors to have equal calibration.
Otherwise the vehicle will always turn.
```
```
java
SensorPort
leftSound
=
SensorPort
.
S1
;
SensorPort
rightSound
=
SensorPort
.
S4
;
leftSound
.
setTypeAndMode
(
SensorPort
.
TYPE_SOUND_DB
,
SensorPort
.
MODE_RAW
);
...
...
@@ -96,7 +96,7 @@ while(!Button.ESCAPE.isDown())
```
The gains for the vehicle is chosen empirically to:
```
```
java
static
float
Kp
=
5.0f
,
Ki
=
0
f
,
Kd
=
0.5f
;
...
...
...
...