Using Sensors

The sensors inside the EV3 brick can be accessed trough the device file system at:

/sys/class/lego-sensor/sensor#/

were # can be 0 to N that correspond to the different sensors that are plugged into the EV3 brick. Notice that when a sensor is removed the device number is not freed and a new sensor entry will be created, therefore N can be larger than 3.

An example of how to read from an I2C sensor can be found here.