GY-302 BH1750 Light Intensity Module حساس شدة إنارة

6.90 $

وحدة استشعار شدة الضوء الرقمية GY-302 هي وحدة استشعار تعتمد على مستشعر الضوء BH1750. BH1750 عبارة عن IC لمستشعر الضوء المحيط الرقمي مع واجهة ناقل I2C. توفر الوحدة قيمة رقمية بسيطة عبر I2C حتى لا تضطر إلى استخدام أي مكونات خارجية مثل محولات AD.

الكمية
In Stock

 

Security policy (edit with Customer reassurance module)

 

Delivery policy (edit with Customer reassurance module)

 

Return policy (edit with Customer reassurance module)

General Specifications

    Light intensity sensor module
    Data output range resembles luminance from 0-65535 lux
    I2C Interface
    No external parts required
    Provides simple digital output

 
Technical Specifications

    Model: GY-302
    Chip: BH1750FVI
    Power supply :3-5V
    Dimensions: 13.9mm X 18.5mm

Here's a basic tutorial on how to connect and use a GY-302 BH1750 Light Sensor Module with an Arduino, along with some sample code:

Step 1: Hardware Connection

Connect the GY-302 BH1750 Light Sensor Module to your Arduino board as follows:

    VCC to 3.3V or 5V (check the module's specifications to determine the correct voltage)
    GND to GND
    SDA to A4 (or SDA pin on your Arduino board)
    SCL to A5 (or SCL pin on your Arduino board)

Step 2: Install Necessary Libraries

You'll need to install the "BH1750" library in order to interface with the GY-302 sensor. You can install this library from the Arduino Library Manager or download it from the GitHub repository.

Step 3: Upload the Example Code

Here's an example code that reads and displays the light intensity data from the GY-302 BH1750 Light Sensor Module:

#include <Wire.h>
#include <BH1750.h>

BH1750 lightMeter; // Create BH1750 sensor object

void setup() {
  Serial.begin(9600); // Initialize Serial communication

  lightMeter.begin(); // Initialize BH1750 sensor
}

void loop() {
  uint16_t lux = lightMeter.readLightLevel(); // Read light intensity in lux

  Serial.print("Light Intensity: ");
  Serial.print(lux);
  Serial.println(" lux");

  delay(1000); // Delay for stability
}

Note: Please make sure you have connected the GY-302 BH1750 Light Sensor Module to the appropriate pins on your Arduino board, as per the tutorial instructions. Also, the example code assumes that you are using the default I2C address of the BH1750 sensor. If your module has a different I2C address, you may need to adjust the code accordingly. Additionally, make sure to handle the sensor with care and avoid exposing it to extreme light conditions or applying excessive force to it, as it may damage the sensor.

Wiki

23014

Specific References

You might also like

chat التعليقات (0)