Why is it that sometimes when using the RCX rotation sensor with the NXT, it requires speeds of less than 360 RPM? It is rated for 500 RPM, and it works perfectly with the RCX (other than the low speed loss of count issue).
With the NXT, sometimes, I am required to use it at a really low speed at first. After a short while, I can start running it at about 360 RPM just fine. If I don't give it this "warm up", then sometimes, it only counts about 1/4-1/3 of the counts (I am not sure the exact fraction, but, based on the internal hardware, I assume it is exactly 1/4). This behavior seems somewhat erratic, but once the sensor is working properly, it will ALWAYS continue to be fine until I restart the program, then there is a chance. Also the "warm up" does NOT always fix it, but it usually helps.
Could this be a firmware (timing/threshold) issue with the low level programming of active sensors, or reading/counting?
I am running BCC 3.3.8.9 and 1.31 NXC/NBC firmware.
RCX rotation sensor with NXT
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
RCX rotation sensor with NXT
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: RCX rotation sensor with NXT
I don't recall anything in the firmware sourcecode that would explain what you are seeing. How are you configuring your sensor port?
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: RCX rotation sensor with NXT
I used
SetSensorType(IN_1, IN_TYPE_ANGLE);
And I tried both of the following (one at a time) in addition to the first.
SetSensorMode(IN_1, IN_MODE_ANGLESTEP);
SetSensorMode(IN_1, SENSOR_MODE_ROTATION);
SetSensorType(IN_1, IN_TYPE_ANGLE);
And I tried both of the following (one at a time) in addition to the first.
SetSensorMode(IN_1, IN_MODE_ANGLESTEP);
SetSensorMode(IN_1, SENSOR_MODE_ROTATION);
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: RCX rotation sensor with NXT
You should try
This is equivalent to the following code:
You should never start using a sensor before it has time to be configured properly. That's what ResetSensor does. Never try to use a sensor unless you call ResetSensor after you change/set its type and/or mode.
John Hansen
Code: Select all
SetSensor(S1, SENSOR_ROTATION);
Code: Select all
SetSensorType(S1, SENSOR_TYPE_ROTATION);
SetSensorMode(S1, SENSOR_MODE_ROTATION);
ResetSensor(S1);
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: RCX rotation sensor with NXT
Thanks, I will try it soon.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Who is online
Users browsing this forum: No registered users and 1 guest