Well, I think I got the FEZ bug, so in search of cool things to do with it I decided to ressurect my 2-year old robot project. During my last attempt I tried using TI MSP430 MCU, but didn’t know enough to get the thing finished. With Domino I think I stand a chance now
Before I go any further: I’m a C# programmer with a lot of experience with building/assembling circuit boards, but no EE experience whatsoever… When it comes to FEZ Domino, robotics etc, I’m a complete noob…
So, here is the idea:
The robot is driven by two stepper motors
It will have two Sharp IR distance/proximity sensors attached to a hobby servo and doint 180 degree sweeps detecting obstacles.
The brains will be on my laptop, so Domino will be responsible for driving the motors and the servo and reporting the “radar” data.
In future I’m sure I’ll find a reason to have an accelerometer, GPS, coffee maker, toaster etc. (Someone once said: if it’s worth doing, it’s definitely worth overdoing)
For now I’m using SparkFun’s BlueSMIRF Blue Tooth modem via SPP profile.
The communications are working fairly reliably so far (via COM1 on FEZ) from 9600 to 115200 baud, as long as I don’t do “bursts” at less than 10ms between lines. (If I sent too much too fast I get an OutOfMemoryException, but every 10ms looks well more than enough…)
I think I will add hardware flow control too, so it should only get better.
My initial thinking is to have the controller (laptop) send commands over the serial port. Some sort of parser will parse them on the Domino and execute the appropriate functions. For example, something like MV R F 10 100 would mean move right motor forward 1 clicks at 100 clicks/second…
So, here are my questions:
- Are there obvious gotchas with this approach?
- Is there a much better way of doing serial communication?
- Am I reinventing a wheel?
Thank you in advance