
castlephelps
USA
Asked
— Edited

Thanks to everyone for helping me get up and going! I've learned how to connect hardware, download projects and learning ez scripting. I have never been one to reinvent the wheel so here goes....
I am looking to build a robot that will steer using polar coordinates. Is there an easy way to do this?
Castle
Alan
Alan
How does your iPhone connect to the ezb in order to stream position sensor data to the ezb? Serial? I2C? Or does it connect to ARC via your network? Just curious?
Is this helping?
here is one on eBay in from a UK seller http://www.ebay.com/itm/Dual-axis-Magnetic-Sensor-Module-UART-I-2-c-Interface-/230643656408
There are probably plenty of choices now that we have UART, but they would all require scripting just to get the data, where this one has a control built in.
For iPhone, it communicates over Wifi. You put the SensorStream app on it, and then in the Misc controls, add a iPhone Sensor Stream Server object, and it creates a bunch of variables for everything the iPhone can detect. I don't use it. I have asked DJ to please create an object for one of the many Android sensor stream type apps available, but it is low on his priority list (if on it at all). The developer of Sensor Stream doesn't make an Android version of the app, but there are half a dozen similar for Android.
@castlephelps Richard is right, your robot needs to have something to compare to in order to give a specific offset direction. the other way to do it is with encoders on your wheel motors so it always knows how far each wheel has spun and can calculate from there, but that is imperfect since wheels can slip on different surfaces. Compass is the easiest solution (GPS doesn't well work inside and doesn't give direction if you are moving at less than 1km/hour).
Servos (other than 360 rotation servos) are easy because they move to specific positions. You can use relative servos or actions and frames to achieve what you want. Very easy to move to specific points in space using preprogrammed actions.
Alan
@Alan, thanks for the link...
http://www.ez-robot.com/Community/Forum/Thread?threadId=6844
Alan
I think that this will take polar coordinate positioning to have the arm travel in a search pattern covering the entire floor. When it finds a tool, it interrupts the search pattern, picks up the tool, puts it in a specific place on a shelf (this would take object recognition and then database look up) and then returns to where it was in the search and continues picking up tools and putting them away until the entire floor is covered.
@bhouston is working on a similar concept (on a smaller scale) so you might get some inspiration from this thread too: http://www.ez-robot.com/Community/Forum/Thread?threadId=6909
Alan
Anyway, here's the code I/we have come up with so far. If anyone has any comments on how to improve it, I am all ears.
Code: