Brick.SetSensorType(Byte, SensorType, Int32[]) Method

Definition

Set the sensor type

public void SetSensorType (byte port, Iot.Device.BrickPi3.Models.SensorType type, int[] param = default);
public void SetSensorType (byte port, Iot.Device.BrickPi3.Models.SensorType type, int[]? param = default);
member this.SetSensorType : byte * Iot.Device.BrickPi3.Models.SensorType * int[] -> unit
Public Sub SetSensorType (port As Byte, type As SensorType, Optional param As Integer() = Nothing)

Parameters

port
Byte

The sensor port(s). Port 1, 2, 3, and/or 4

type
SensorType

The sensor type

param
Int32[]

param is used only for some sensors and can be ignore for the others param is used for the following sensor types: CUSTOM-- a 16 - bit integer used to configure the hardware. I2C-- a list of settings: param[0]-- Settings / flags param[1] -- target Speed in microseconds(0-255). Realistically the speed will vary. if SENSOR_I2C_SETTINGS_SAME flag set in I2C Settings: param[2] -- Delay in microseconds between transactions. param[3] -- Address param[4] -- List of bytes to write param[5] -- Number of bytes to read

Applies to