This project has moved and is read-only. For the latest updates, please go here.

How to read the InfraredMode 'Beacon Proximity' an 'Beacon Detcted' values

Jun 16, 2015 at 11:55 AM
Edited Jun 16, 2015 at 1:01 PM
As I understand, the Infrared sensor supports two types of Proximities, One for detecting any object, and one specifically for the IR Beacon. I have not been able to get it to return the IR Beacon Proximity value

I have tried setting the port mode like this
brick.Ports[InputPort.Four].SetMode(InfraredMode.Seek);
using any of the provided InfraredMode enum values or raw Byte values (tried 0 - 10) , but none of these modes result in giving me the Beacon Proximity.

public enum InfraredMode
{
    Proximity,
    Seek,
    Remote,
    RemoteA,
    SAlt,
    Calibrate,
}
And then reading the port values (Raw Valuem SIValue, Percentage) from the BrickChanged event

When playing with the InfraRed Modes I found the follwing
Proximity => object proximity (not for the Beacon)
Seek => Proximity heading
Remote => IR buttons (Channel 1)
RemoteA => seems to somehow respond to buttons on the remote
SAlt => Sometimes after setting this mode the brick stops sending events at all
Calibarate => Sometimes after setting this mode the brick stops sending events at all

If I use the Mindstorms GUI application I can set the IR sensor to 'Beacon' mode, which the gives me values for Channel, Heading, Proximity and Detected. Can I get these same values using the API? In the GUI it is also possible to specify the channel to look for. How Do I achieve the same using the .Net API?