sts1_sensors.edu.L3GD20H ======================== .. py:module:: sts1_sensors.edu.L3GD20H Module Contents --------------- .. py:class:: L3GD20H(range=245, datarate=12.5, address=None, bus=None) Three-axis gyroscope. :param int range: Maximum angular velocity or speed of rotation that the gyro can read, measured in degrees per second (dps). Allowed values: `[245, 500, 2000]`, defaults to 245. :param float datarate: Number of measurements per second [Hz]. Allowed values: `[12.5, 25, 50, 100, 200, 400, 800]`, defaults to 12.5. :param hexadecimal address: Physical address of the sensor on the board (see `i2cdetect` command). Allowed values: `[0x6A, 0x6B]`. If None, the environment variable `STS1_SENSOR_ADDRESS_L3GD20H` will be used. If environment variable is not found, 0x6A will be used. :param SMBus bus: A SMBus object. If None, this class will generate its own, defaults to None. Example: .. code-block:: python gyro = L3GD20H(range=245, datarate=12.5) x, y, z = gyro.get_dps() print(f"{x=:.2f} dps, {y=:.2f} dps, {z=:.2f} dps") .. py:property:: range .. py:property:: datarate .. py:method:: get_dps_raw() Get raw degrees per second. .. py:method:: get_dps() Get degrees per second.