

The ST-GYRO-PY is a gyroscope sensor module designed to measure angular velocity across three axes: X, Y, and Z. This module is widely used in applications requiring precise motion detection and orientation tracking. Its compact design and reliable performance make it a popular choice for robotics, drones, gaming devices, and other motion-sensitive systems.








Below are the key technical details of the ST-GYRO-PY module:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Operating Current | 5 mA (typical) |
| Measurement Range | ±250, ±500, ±1000, ±2000 °/s |
| Communication Protocol | I2C and SPI |
| I2C Address | 0x68 (default) |
| Output Data Rate | Up to 8 kHz |
| Operating Temperature | -40°C to +85°C |
| Dimensions | 20mm x 15mm x 3mm |
The ST-GYRO-PY module has 8 pins, as described in the table below:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V to 5V) |
| 2 | GND | Ground connection |
| 3 | SCL | I2C clock line (used for I2C communication) |
| 4 | SDA | I2C data line (used for I2C communication) |
| 5 | CS | Chip Select (used for SPI communication; active low) |
| 6 | SDO | SPI data output (or I2C address selection: HIGH = 0x69, LOW = 0x68) |
| 7 | INT | Interrupt pin (used to signal data availability or events) |
| 8 | NC | Not connected (reserved for future use) |
To use the ST-GYRO-PY module with an Arduino UNO, follow these steps:
Wiring:
Install Required Libraries:
Wire library (pre-installed with Arduino IDE).Adafruit_MPU6050 if compatible.Arduino Code Example: Below is an example code snippet to read angular velocity data from the ST-GYRO-PY module:
#include <Wire.h>
const int gyroAddress = 0x68; // Default I2C address for ST-GYRO-PY
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Start serial communication for debugging
// Wake up the gyroscope (write 0 to the power management register)
Wire.beginTransmission(gyroAddress);
Wire.write(0x6B); // Power management register
Wire.write(0x00); // Set to 0 to wake up the sensor
Wire.endTransmission();
}
void loop() {
Wire.beginTransmission(gyroAddress);
Wire.write(0x43); // Starting register for X-axis angular velocity
Wire.endTransmission(false);
Wire.requestFrom(gyroAddress, 6, true); // Request 6 bytes (X, Y, Z)
// Read angular velocity data
int16_t gyroX = (Wire.read() << 8) | Wire.read(); // Combine high and low bytes
int16_t gyroY = (Wire.read() << 8) | Wire.read();
int16_t gyroZ = (Wire.read() << 8) | Wire.read();
// Print the data to the Serial Monitor
Serial.print("Gyro X: ");
Serial.print(gyroX);
Serial.print(" | Gyro Y: ");
Serial.print(gyroY);
Serial.print(" | Gyro Z: ");
Serial.println(gyroZ);
delay(500); // Delay for readability
}
No Data Output:
Inaccurate Readings:
Arduino Not Detecting the Module:
I2C Scanner sketch to confirm the module's I2C address.Interrupt Pin Not Working:
Q: Can the ST-GYRO-PY be used with a Raspberry Pi?
A: Yes, the module supports I2C and SPI communication, making it compatible with Raspberry Pi. Use the appropriate GPIO pins for I2C or SPI connections.
Q: How do I change the I2C address?
A: The I2C address can be changed by setting the SDO pin HIGH (0x69) or LOW (0x68).
Q: Does the module require external pull-up resistors?
A: Some versions of the ST-GYRO-PY module include built-in pull-up resistors. If not, you will need to add 4.7kΩ resistors to the SCL and SDA lines.
Q: What is the maximum angular velocity the module can measure?
A: The module can measure angular velocity up to ±2000 °/s, depending on the selected range.
By following this documentation, you can effectively integrate and troubleshoot the ST-GYRO-PY module in your projects.