NXC: 4 US sensors at 1 HT SensorMux in single shot mode?
NXC: 4 US sensors at 1 HT SensorMux in single shot mode?
how can we use several (4) Lego US sensors at 1 HT SensorMux in single shot mode (by NXC)?
Re: NXC: 4 US sensors at 1 HT SensorMux in single shot mode?
no ideas anyone?
Re: NXC: 4 US sensors at 1 HT SensorMux in single shot mode?
That one is easy, you can't. The HT Sensor MUX does not allow you to write to the sensor, so it uses the standard mode which is continuous.
- Xander
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: NXC: 4 US sensors at 1 HT SensorMux in single shot mode?
...and configure a specific i2c reading or writing by specific ports, messages, bytes that lets the mux do things with any kind of general i2c sensor, not "knowing" that it's addressing a LegoUS (hope I could express myself comprehensibly) ?
(hmm - probably not, I guess, otherwise you had suggested that workaround by your own, but I do understand too little about i2c commands)
(hmm - probably not, I guess, otherwise you had suggested that workaround by your own, but I do understand too little about i2c commands)
Re: NXC: 4 US sensors at 1 HT SensorMux in single shot mode?
You cannot send commands of any kind to a sensor connected to the Sensor MUX. It can only read a sensor connected to it. You can tell the MUX which register to read and how many bytes but nothing more. It's read-only, that means no writing
Trust me, if there was a way around it, I would've used it.
- Xander
Trust me, if there was a way around it, I would've used it.
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: NXC: 4 US sensors at 1 HT SensorMux in single shot mode?
Frustrating, but I certainly do^^
I may redesign my sensor architecture for a different solution, so another question, admittedly OT -
but can you (or even anyone else) tell me if there is a way to use
1 Lego US sensor
1 HT compass sensor
1 HT accelerometer
altogether at 1 port splitter in order to use the US sensor in single shot mode (the single shot function I already got working)?
(by disabling the pullups by software at 2 of the sensors and of course adjusting all i2c address registers accordingly)
I may redesign my sensor architecture for a different solution, so another question, admittedly OT -
but can you (or even anyone else) tell me if there is a way to use
1 Lego US sensor
1 HT compass sensor
1 HT accelerometer
altogether at 1 port splitter in order to use the US sensor in single shot mode (the single shot function I already got working)?
(by disabling the pullups by software at 2 of the sensors and of course adjusting all i2c address registers accordingly)
Re: NXC: 4 US sensors at 1 HT SensorMux in single shot mode?
In short: no.
Long story: the HT sensors do not support having their I2C address changed or their pull-ups disabled.
- Xander
Long story: the HT sensors do not support having their I2C address changed or their pull-ups disabled.
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: NXC: 4 US sensors at 1 HT SensorMux in single shot mode?
Hi Doc,
I had a thought about a work-around for your US sensor/mux problem... At the cost of a motor and motor port, you could rotate a single US sensor in a +/- 180 deg sweep back and forth to get full radius 'look around'. You could even use a sensor mux, since no interference means you don't need single-shot mode.
Not sure at all if that method would work for your particular needs or application, but thought it worth suggesting.
Cheers,
LoopyMech
I had a thought about a work-around for your US sensor/mux problem... At the cost of a motor and motor port, you could rotate a single US sensor in a +/- 180 deg sweep back and forth to get full radius 'look around'. You could even use a sensor mux, since no interference means you don't need single-shot mode.
Not sure at all if that method would work for your particular needs or application, but thought it worth suggesting.
Cheers,
LoopyMech
Re: NXC: 4 US sensors at 1 HT SensorMux in single shot mode?
of course I know that, but it's not possible because of the size and the architecture of the robot ( e.g. a big, 80cm high and up to 110cm long 5 DOF rotating robot arm in the middle with a 25-135 cm forward projecting gripper)
I have 6 USS to control (for object and obstacle size and localization detection), at least 3 have to be controlled by single shot mode (these three forwards are aligned in different heights), and I also got no motor port left for rotating (I have already 9 NXT motors and 18+ sensors to attach to 3 NXT bricks working "scaled" altogether in a BT network)
I have 6 USS to control (for object and obstacle size and localization detection), at least 3 have to be controlled by single shot mode (these three forwards are aligned in different heights), and I also got no motor port left for rotating (I have already 9 NXT motors and 18+ sensors to attach to 3 NXT bricks working "scaled" altogether in a BT network)
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests