Module: BrickPi::Native

Defined in:
ext/brick_pi/native.c

Defined Under Namespace

Modules: Address, Encoder, MotorEnable, MotorSpeed, Sensor, SensorType

Constant Summary collapse

PORT_A =
INT2FIX(0)
PORT_B =
INT2FIX(1)
PORT_C =
INT2FIX(2)
PORT_D =
INT2FIX(3)
PORT_1 =
INT2FIX(0)
PORT_2 =
INT2FIX(1)
PORT_3 =
INT2FIX(2)
PORT_4 =
INT2FIX(3)
US_PORT =
INT2FIX(2)
TYPE_SENSOR_TOUCH =
INT2FIX(32)
TYPE_SENSOR_ULTRASONIC_CONT =
INT2FIX(33)
TYPE_SENSOR_ULTRASONIC_SS =
INT2FIX(34)
TYPE_SENSOR_COLOR_FULL =
INT2FIX(36)
TYPE_SENSOR_COLOR_RED =
INT2FIX(37)
TYPE_SENSOR_COLOR_GREEN =
INT2FIX(38)
TYPE_SENSOR_COLOR_BLUE =
INT2FIX(39)
TYPE_SENSOR_COLOR_NONE =
INT2FIX(40)

Class Method Summary collapse

Class Method Details

.BrickPiSetTimeoutObject



58
59
60
# File 'ext/brick_pi/native.c', line 58

VALUE bprb_BrickPiSetTimeout(VALUE self) {
    return INT2FIX(BrickPiSetTimeout());
}

.BrickPiSetupObject



5
6
7
# File 'ext/brick_pi/native.c', line 5

VALUE bprb_BrickPiSetup(VALUE self) {
    return INT2FIX(BrickPiSetup());
}

.BrickPiSetupSensorsObject



9
10
11
# File 'ext/brick_pi/native.c', line 9

VALUE bprb_BrickPiSetupSensors(VALUE self) {
    return INT2FIX(BrickPiSetupSensors());
}

.BrickPiUpdateValuesObject



62
63
64
# File 'ext/brick_pi/native.c', line 62

VALUE bprb_BrickPiUpdateValues(VALUE self) {
    return INT2FIX(BrickPiUpdateValues());
}

.ClearTickObject



13
14
15
# File 'ext/brick_pi/native.c', line 13

VALUE bprb_ClearTick(VALUE self) {
    return INT2FIX(ClearTick());
}

.Timeout=(timeout) ⇒ Object



35
36
37
38
# File 'ext/brick_pi/native.c', line 35

VALUE bprb_Timeout_set(VALUE self, VALUE timeout) {
    BrickPi.Timeout = FIX2INT(timeout);
    return timeout;
}