Getting Started
This guide provides instructions on how to use the TEMT6000 ambient light sensor with an Arduino-compatible board (like the Pulsar ESP32 C6) or a MicroPython-compatible board (like the DualMCU) to detect ambient light levels and display the results via the Serial Monitor.
Hardware Requirements
- Microcontroller Board: ESP32 or compatible
- Sensor: TEMT6000 Ambient Light Sensor
- Cabling: JST connector
Wiring Instructions
- VCC: Connect to 5โฏV (match your boardโs logic level)
- GND: Connect to GND (common ground)
- SIG: Connect to GPIO12 (digital input on the microcontroller)
Software Setup
- Install the Arduino IDE or Thonny IDE.
- Create a new project and paste the code from
light_sensor.ino
(Arduino) orlight_sensor.py
(MicroPython). - Upload the code to your board.
- Open the Serial Monitor at 115200 baud to view sensor output.
How to Use
-
Power up the board with the uploaded code.
-
Check the Serial Monitor for messages:
- If light is detected:
๐ Light detected (HIGH)
- If no light is detected:
๐ No light (LOW)
- If light is detected:
-
Testing:
- Cover the sensor to simulate darkness.
- Shine a light on the sensor to simulate brightness.
- Observe changes in the Serial Monitor output.
Troubleshooting
- No Output in Serial Monitor:
- Ensure the correct COM port is selected.
- Verify baud rate is set to 115200.
- Incorrect Readings:
- Check wiring connections.
- Ensure the sensor is receiving power.
- Sensor Not Responding:
- Test with a different GPIO pin.
- Board Not Recognized:
- Install necessary drivers for your microcontroller board.
Additional Resources
License
This project is licensed under the MIT License. See the LICENSE file for details.