Example #1
0
 /// <summary>
 /// initialiaze BrickPiStruct
 /// </summary>
 public BrickPiStruct()
 {
     //address for the Arduinos, 1 and 2
     address[0] = 1;
     address[1] = 2;
     for (int i = 0; i < i2C.Length; i++)
         i2C[i] = new BrickSensorI2C();
     for (int i = 0; i < sensor.Length; i++)
     {
         //create new sensors
         sensor[i] = new BrickSensor();
         //initial setup is RAW sensor
         sensor[i].Value = (int)BrickSensorType.SENSOR_RAW;
     }
     for(int i=0; i<motor.Length;i++)
     {
         motor[i] = new BrickMotor();
     }
 }