My class is currently working on a project with the NXT-Bee. We've succesfully created a remote control with one NXT (master) controlling another (slave). The master uses two touch sensors and the NXT buttons as commands for the other robot. As an extension, I wanted the students to program the slave robot to send the encoder values to the master robot and have the encoder values displayed. That is where we are having problems. The code is below; any help would be appreciated. Thanks,

else if (StringFind(messageReceived, "3") == 2) //else, if the first character is a 3 {

if(StringFind(messageReceived, "R") == 0) //If the first character (index 0) is an R { motor[motorB] = 100; //Turn motorB on at 100 power } else if (StringFind(messageReceived, "1") == 0) //else, if the first character is a 1 { motor[motorB] = 0; //Turn motorB off }

if(StringFind(messageReceived, "L") == 1) //If the second character (index 1) is an L { motor[motorC] = 100; //Turn motorC on at 100 power } else if (StringFind(messageReceived, "2") == 1) //else, if the second character is a 2 { motor[motorB] = 0; //Turn motorC off } }

if(StringFind(messageReceived, "C") == 3) //If the fourth character (index 3) is an C { motor[motorC] = 50; //Turn motorC on at 100 power } else if (StringFind(messageReceived, "4") == 3) //else, if the fourth character is a 4 { motor[motorB] = -50; //Turn motorC off }

From there, they wanted to improve the capabilities of their remote controls. They added a third touch sensor to instruct the slave robot to move backwards, and they used the NXT buttons to command the gripper attachment on Motor A to open or close. They programmed all of this successfully.

Next, I gave them the challenge of having the slave robot send encoder values back to the master. Once we added that part, our robots now do nothing. The programs says its running, but none of the commands on the remote control (master robot) do not work. If you need more detail, let me know.

I would like to get to the point where the slave robot is creating a map on the LCD screen of the master robot. I'll need some help though, so any help would be greatly appreciated.

Mon Feb 18, 2013 7:25 pm

G.Singh

Rookie

Joined: Sat Jun 01, 2013 6:26 amPosts: 2Location: India

Re: Remote Control with NXT-Bee

Mightor will help us to get out from this problem as he said " I can't test the code for you "..

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum