The CJMCU-6035, manufactured by UHXRUY, is a high-performance sensor module that integrates a high-precision 3-axis accelerometer and gyroscope. This module is designed for motion detection, orientation sensing, and environmental monitoring. It is widely used in applications such as robotics, drones, smartphones, and other devices requiring accurate motion tracking and orientation data.
The CJMCU-6035 is based on the VEML6035 Ambient Light Sensor, which provides precise light intensity measurements. It is ideal for applications requiring ambient light sensing, such as automatic brightness adjustment in displays, smart lighting systems, and environmental monitoring.
The CJMCU-6035 module has the following pinout:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply input (2.5V to 3.6V) |
2 | GND | Ground |
3 | SDA | I2C data line |
4 | SCL | I2C clock line |
5 | INT | Interrupt output (motion detection) |
6 | NC | Not connected (leave unconnected) |
Below is an example Arduino sketch to read ambient light data from the CJMCU-6035:
#include <Wire.h>
// I2C address of the CJMCU-6035
#define CJMCU_6035_ADDR 0x10
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication for debugging
// Configure the sensor (example: set gain and integration time)
Wire.beginTransmission(CJMCU_6035_ADDR);
Wire.write(0x00); // Command register
Wire.write(0x01); // Example configuration value
Wire.endTransmission();
Serial.println("CJMCU-6035 initialized.");
}
void loop() {
uint16_t lightData = 0;
// Request 2 bytes of light data from the sensor
Wire.beginTransmission(CJMCU_6035_ADDR);
Wire.write(0x04); // Data register
Wire.endTransmission();
Wire.requestFrom(CJMCU_6035_ADDR, 2);
if (Wire.available() == 2) {
lightData = Wire.read(); // Read high byte
lightData = (lightData << 8) | Wire.read(); // Read low byte
}
// Print the light intensity in lux
Serial.print("Ambient Light: ");
Serial.print(lightData * 0.0036); // Convert to lux
Serial.println(" lux");
delay(1000); // Wait 1 second before the next reading
}
No Data from Sensor:
Incorrect Light Readings:
Interrupt Pin Not Working:
Power Issues:
Can the CJMCU-6035 be used with 5V microcontrollers?
Yes, but you must use a level shifter for the I2C lines to avoid damaging the sensor.
What is the maximum I2C clock speed supported?
The CJMCU-6035 supports I2C clock speeds up to 400kHz (Fast Mode).
How do I change the accelerometer or gyroscope range?
Use the appropriate I2C commands to configure the desired range. Refer to the sensor's datasheet for details.
Can the sensor operate in low-light conditions?
Yes, the sensor is highly sensitive and can measure light intensities as low as 0.0036 lux.