Using bluetooth you can steer the NXT.
This steering, commanding and reading of sensors can be done from several programming environments, like the fantom lib, or the C++ or the C# lib, many others available. For all these libs there is a limit to what can be done due to the master slave concept.
Working with several sensors all went well.
But trying out the camera sensor we ran into trouble: this camera has to be put in tracking mode by setting a register on this I2C sensor.
We discovered after quite a bit of time that the setting of registers by sending of DIRECT COMMANDS using bluetooth was not working.
Only by a prog on the brick, in our case in JAVA lejos, the camera can be set into tracking mode.
The same is true for setting the time on the clock sensor. We had written a method in the clock C++ class for setting the time, but this method can be thrown away.
The idea is that in the bluetooth relation there is a master and a slave. The master, in this case the NXT brick can set registers of the sensors, the slave, apparently (for us the PC) cannot.
So the sensors can be read, but not really put into other modes by the LSWRITE command.
This means that changing the factory address of an I2C sensor must be done on the brick too.
(Changing this address of an I2C sensor is necessary when connecting several I2C sensors to the same sensor port. The method is described in the mindsensors sheets.)
This resolves a few days of frustration, trying to get the camera sensor working.
After making a JAVA Lejos prog and transferring it to the brick, the camera was tracking without any problems, given that the colors of the objects to be tracked were defined in the NXTCAM view prog.
searching further, i came across this site: http://www.pspwp.pwp.blueyonder.co.uk/science/robotics/nxt/index.html
having a prog to steer the nxt
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment