Tuesday, July 22, 2014
The range plot
After a little bit of tweaking, this is what the range plot looks like. 0 degrees is roughly straight ahead of the robot, and 90 degrees is to the left. (Unless my memory has things reversed...) In this scan, I'm sitting roughly in front of the robot as I'm testing out the scan, so you can see that I'm sitting roughly 20 inches in front of the robot at the height of the sensor (with the robot sitting on the table).
Unfortunately, it takes about 30 seconds or so to run through the scan and put up the plot in Python, and that's with a direct Ethernet connection to the already-slow Raspberry Pi. Imagine how slow the response will be over wifi. Still, it works, so that's something. I suppose I could have bought a faster stepper motor, but I was going cheap -- <$4. I had to tweak the delay time between steps and make the delay longer and longer, because shorter delay times caused the steps not to be always repeatable -- after multiple cycles, I ended up not returning to the same starting and stopping positions, which you don't want with a stepper motor.