Sunday 12 July 2009

Skype SDK

Now that the electronic to control the motors is working, I can focus a bit more on the software.
My robot will be able to move and take decision by itself, but I still want to be able to take control via the web.
The idea is to be able to control the moves and get video feedback. I tried many example found on the web, but all not as good as I was expecting. I want something as easy as messenger or Skype.

Then I found this: https://developer.skype.com/Download It is the Ski SDK website.
You can interface Skype wit your own application using their SDK.

After creating a Skype account for my robot and one hours playing with it, I was able to check incoming message to from Skype.
If I send the message 45;400 via Skype, my application will catch it, decode it and order the electronic to turn 45 degres then travel 400cm forward. The video feedback is very simple as it use Skype.
Then it took me another 20 minutes to create a simple application that look like a remote control for my robot. This 'remote' control is to be run on the remote side of Skype that will send the motion code 45;400 in this example.

Here is how it look like:


you can see the little remote control and Skype with the motion command sent to the robot. This solution will work in any situation where Skype works. So no need to deal with sub network or port number or this like this.

Thursday 9 July 2009

At least, I solved the com between the mini PC and the PID

After many hours trying to make the serial link between the PC and the Gamoto PID board without success, I am back with the I2C protocol.

The serial link is working fine if I only talk to one board, but when I try to communicate to the second board, it just does work.

I2c is designed to talk to multiple slave, so I guess it is better. I tried to use I2C in the past without success, but this time it is working.
I can now do the following:

- Application load a rotation angle on trajectory 2 of both PID
- Application load a distance on trajectory 1 on both PID
- Application command the PIDs to execute trajectory 2
- Wait for Trajectory 2 to be done
- Application command the PIDs to execute trajectory 1
- Wait for Trajectory 2 to be done
- Send to PIDs the SetHome signal to be reading for the next move

This move allow me to select a direction and distance via the mouse to be executed by the robot.
all move are managed by the PIDs. In case the PC crash, the PIDs will finish the move and wait.

It is a good start. There still few bugs and extra code to add, but at last, I have a robot that moves.