Rexex

I am trying to get the touch sensor to work on ports other than port 1. I am able to run the tutorial with no problems when the touch sensor is connected to port 1. But when I change the values in the NXT Brick Service page to put the touch sensor on port 2 (or 3, 4) the service does not register the touch sensor. To add insult to injury, when I switch back to port 1 the bumper routine within tutorial1 (Ouch-sensor activated) no longer works.

Re: Microsoft Robotics - Hardware Configuration and Troubleshooting NXT and Robotics Tutorial1

Rexex

Found a bit of a work around....but would still like some help understanding what is going on. I go into the NXT brick service and set the touch sensor to the port that I choose (i.e. port 2,3 or 4) *and* set the comm port back to 0, hit reconnect (which gives me an Http 400 Bad Request). I then stop the Tutorial1 service and restart. At this point I get the NXT brick service prompting me for a comm port (at this point I can point the touch sensor to whatever port I want. When I hit reconnect with the comm port filled in, the Tutorial1 service functions correctly with the new port.

So does this mean that the NXT brick service only configures the sensor information when going from an invalid comm port (port 0) to a valid comm port Any help would be appreciated.





Re: Microsoft Robotics - Hardware Configuration and Troubleshooting NXT and Robotics Tutorial1

Kexyn

I am having a similar problem. I'm trying to configure my own manifest file to support 2 buttons that either speed up or slow down a motor.

I think your problem has to do with the default setup of an NXT. I think it's something like a touch sensor in port 1, a sound sensor in port 2, a microphone in port 3, and sonar in port 4. Plugging your bumper into another port doesn't change the input, because the service is still expecting that default input. So when you change it from the web interface, you're modifying the default setup to support a bumper being plugged into a different port. That's why when you change the settings through the web interface, it will do what you want.

The only way to get around that, as far as I've discovered, is to change the manifest file. A good example of that is here.

However, I'm using that example, but trying to add another bumper. I get the manifest file set up and all of the appropriate code changed, but when I run the program, only the button plugged into port 1 does anything. Am I doing something wrong or missing something somewhere

I think our problems are related, so if anybody could help us, that would be awesome! I hope I helped you at least a little.




Re: Microsoft Robotics - Hardware Configuration and Troubleshooting NXT and Robotics Tutorial1

Dave Lee

yes, you are correct. NXT initialization is very slow, so the sample service attempts to streamline the process by not initializing every time. It seems that you found a bug in this process when reconfiguring the ports!

By setting the COM port to 0, you force the initialization process to be run again. This is necessary any time a configuration change is made, since the small program running on the NXT must be told what sensors are connected to each port. This only happens when the service is starting.