SomethingUnreal | Dojikko Gets Side Sensors @SomethingUnreal | Uploaded 9 years ago | Updated 4 hours ago
I've given her another 2 ultraound sensors on either side, so that she can see how well lined-up she is to walls on either side of her. This is to try to keep her heading directly towards a wall, so that the head ultrasound sensor will get the best reflections possible (assuming that her environment uses lots of right-angles).
The Arduino fires all 3 ultrasound sensors and listens for their echoes at the same time in order to "see" at the highest frame rate possible (typically 20-50 FPS), but this causes issues with echoes from one sensor bouncing around and returning to a different sensor. Although the code avoids any clearly-bad echoes like this (e.g. 2 echoes on the same sensor), it's far from perfect, and she often thinks that she's crashed into something (an object is very close to the head) when she hasn't. I think there's also a strange bug in the function that times the echo delays, or something strange is going on with hardware interrupts, because the function sometimes returns 0 for a sensor which clearly has an object in range, and at the same time, the sound of the tone playing on the speaker (using the built-in tone() function) becomes distorted so that it doesn't even sound like a square wave anymore. I've never experienced that before, and I have no idea what's wrong there. Oh well, she looks cool aligning herself half of the time.
Fun game to play: See how many inconsistencies there are in this video. It's a combination of videos recorded 7 months apart.
I've given her another 2 ultraound sensors on either side, so that she can see how well lined-up she is to walls on either side of her. This is to try to keep her heading directly towards a wall, so that the head ultrasound sensor will get the best reflections possible (assuming that her environment uses lots of right-angles).
The Arduino fires all 3 ultrasound sensors and listens for their echoes at the same time in order to "see" at the highest frame rate possible (typically 20-50 FPS), but this causes issues with echoes from one sensor bouncing around and returning to a different sensor. Although the code avoids any clearly-bad echoes like this (e.g. 2 echoes on the same sensor), it's far from perfect, and she often thinks that she's crashed into something (an object is very close to the head) when she hasn't. I think there's also a strange bug in the function that times the echo delays, or something strange is going on with hardware interrupts, because the function sometimes returns 0 for a sensor which clearly has an object in range, and at the same time, the sound of the tone playing on the speaker (using the built-in tone() function) becomes distorted so that it doesn't even sound like a square wave anymore. I've never experienced that before, and I have no idea what's wrong there. Oh well, she looks cool aligning herself half of the time.
Fun game to play: See how many inconsistencies there are in this video. It's a combination of videos recorded 7 months apart.