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.

No comments:

Post a Comment