Changes in the robot's position are reflected less strongly in the readings of the color sensor than those of the light sensor - that is, the same angle seemed to induce less of a change in the color sensor's readings. We therefore speculated that we needed to multiply the error by a larger value in order to adequately correct the robot's position, which means that a larger value of p might result in the robot balancing better as the change in reading would then have a larger effect.
Changes in the robot's position are reflected less strongly in the readings of the color sensor than those of the light sensor - that is, the same angle seemed to induce less of a change in the color sensor's readings. We therefore speculated that we needed to multiply the error by a larger value in order to adequately correct the robot's position, which means that a larger value of p might result in the robot balancing better as the change in reading would then have a larger effect.
Plot of readings:
- engines off
- tilt Frej (start balancing on sensor, tilt backwards) BILLEDE!
NB: Lyset i rummet ændrede sig mellem de to plots - men det burde ikke være relevant for vores sammenligning.
NB: Vi bevæger den ikke nødvendigvis lige hurtigt hver gang, hvilket også påvirker hældningen.
#### Comparison with light sensor
#### Comparison with light sensor
In order to test the hypothesis that changes in position reflect less strongly in readings of the color sensor, we performed an experiment using first the color sensor and then the light sensor. For each sensor, the following process was executed:
In order to test the hypothesis that changes in position reflect less strongly in readings of the color sensor, we performed an experiment using first the color sensor and then the light sensor. For each sensor, the following process was executed:
We held the robot in the equilibrium position (judging by view) and calibrated the setpoint. We then tilted it forward until the sensor (sitting on its front) prevented further movement. From there, we slowly tilted the robot backwards. The equilibrium position, the starting position, and the ending position are all showed in figure 5.
We held the robot in the equilibrium position (judging by view) and calibrated the setpoint. We then tilted it forward until the sensor (sitting on its front) prevented further movement. From there, we slowly tilted the robot backwards. The equilibrium position, the starting position, and the ending position are all showed in figure 5. The robot's motors were off during the experiment.
We logged the readings, as well as saving the setpoint so that it could be plotted along with the readings.
We logged the readings, as well as saving the setpoint so that it could be plotted along with the readings.
During the process of switching from the color sensor to the light sensor, the lighting in the room had changed which we noted as a possible source of error.


*Figure 4: finding the setpoint value in an attempted equilibrium position (first image), start position (second image), and end position (third image)*
*Figure 4: finding the setpoint value in an attempted equilibrium position (first image), start position (second image), and end position (third image)*