brian.sensors.HiTec.GyroSensorHiTec
GyroSensorHiTec class objects
class GyroSensorHiTec(Sensor)
Class for interacting with HiTec gyro sensor.
Sensor is automatically registered in the constructor of the base class and un-registered in its destructor. It can also be unregistered with the GyroSensorHiTec.close_sensor() function.
There can be at most one instance at any given time, of any sensor class per port in the entire program.
__init__
def __init__(port: SensorPort)
Initialize an HiTec gyro sensor at the given port.
Arguments:
port
: Sensor port to which the sensor is attached.
speed
def speed() -> int
Measures the sensor state. Returns the angular speed in range -500 to 400
Raises:
brian.sensors.SensorIsNotReadyError
: If the sensor is not ready.
Returns:
angular speed in degrees/second (-500 to 400).