Page 1 of 1
Distance value and proximity sensor id.
Posted: Thu Oct 21, 2021 3:42 pm
by AntonioC
Code: Select all
const CCI_FootBotProximitySensor::Treadings& tProxReads = m_pcProximity -> GetReadings();
The Footbot has 24 proximity sensors, numbered from 0 to 23. How can I get the measured value and the sensor ID?
Re: Distance value and proximity sensor id.
Posted: Thu Oct 21, 2021 4:19 pm
by pincy
Have a look at
this example.
Re: Distance value and proximity sensor id.
Posted: Thu Oct 21, 2021 4:56 pm
by AntonioC
I read that. But I didn't understand how to get the last measured value for each sensor.
Re: Distance value and proximity sensor id.
Posted: Thu Oct 21, 2021 5:02 pm
by pincy
I'm sorry, but I don't understand the question. The values can be accessed using tProxReads[ i ].Value, where i is the index of the sensor you want. Do you need something else?
Re: Distance value and proximity sensor id.
Posted: Fri Oct 22, 2021 7:37 pm
by AntonioC
Now it's all clear. Thanks.