... | ... | @@ -144,13 +144,13 @@ while (true) { |
|
|
The power to the motor is controlled by the motorPowerLeft and motorPowerRight variables which are determined by the readings from the light and ultrasonic sensors. To only get readings between 0 and 100 from the ultrasonic sensor we divide the readings by 255 and multiply by 100. In order to give the ultrasonic sensor less priority than the light sensor, the total value is divided by 4 and in turn subtracted by 25 to make the readings high when its close to an object and low otherwise.
|
|
|
We observed the robot having trouble moving because it received too low motor power, therefore we added a scale value to increase the overall motor power.
|
|
|
|
|
|
When using the mapping as seen in fig. 7. of the weekly assignment, we learned that the robot had a behaviour of moving towards objects and stopping. This was because of the inhibitory connection between the ultrasonic sensors and the electrical motors. The motor in the same side as the ultrasonic sensor would move slower as the distance to an object in that side got smaller, causing the robot to turn towards the object, and getting it in front of the other ultrasonic sensor, causing the robot to stop completely.
|
|
|
We have a video (see fig ??) showing the robot turning towards the light of the doorway and stopping after the coming too close to an object in the room.
|
|
|
When using the mapping as seen in fig. 10. of the weekly assignment, we learned that the robot had a behaviour of moving towards objects and stopping. This was because of the inhibitory connection between the ultrasonic sensors and the electrical motors. The motor in the same side as the ultrasonic sensor would move slower as the distance to an object in that side got smaller, causing the robot to turn towards the object, and getting it in front of the other ultrasonic sensor, causing the robot to stop completely.
|
|
|
We have a video (see fig. 12) showing the robot turning towards the light of the doorway and stopping after the coming too close to an object in the room.
|
|
|
We can conclude that when using two types of sensors as an exitatory and inhibitory connection to control the same value, the robot will at some point come to a complete stop, as the two sensor values cancel each other out.
|
|
|
|
|
|
|
|
|
[![image alt text](http://img.youtube.com/vi/kWPPdGhtCJ0/0.jpg)](http://www.youtube.com/watch?v=kWPPdGhtCJ0)
|
|
|
##### Fig. 12 - shows how the robot strives to find the light of god.
|
|
|
##### Fig. 12 - shows how the robot strives to find the light of god (-god). ;)
|
|
|
|
|
|
## References
|
|
|
|
... | ... | |