This project uses the ESP-Claw framework together with the UNIHIKER K10 and a Gravity SCI data-acquisition module to build an adaptive, AI-controlled ambient light, with zero coding and low hardware cost.
By connecting a light sensor and an RGB strip, the system automatically adjusts brightness and on/off state based on real-time ambient light. It turns the light on when the room gets dark, off when it is bright enough, and pushes brightness higher in very dim conditions: intelligent perception and automatic control of the physical environment.
Bill of materials- UNIHIKER K10 x 1
- Gravity: SCI Data Acquisition Module x 1
- Ambient Light Sensor x 1
- 7-LED RGB strip x 1
Connect the SCI module to the I2C port of the UNIHIKER K10 with a 4-pin cable. Attach the light sensor to Port2 of the SCI module, and plug the RGB strip into the P1 port of the UNIHIKER K10.
After wiring, flash the ESP-Claw firmware following the previous tutorial, How boring the sensor-free ESP-Claw is, and complete the Wi-Fi and LLM configuration. Once configured, you can enable ESP-Claw to "perceive ambient light".
Step 1: Establish light perceptionFirst, make the ESP-Claw-powered UNIHIKER K10 "understand" real-time ambient light data. Send the following message in the chat tool:
I have now connected a light sensor to the SCI module. Please read the current light intensity data and determine whether the room environment is dark, dim, normal, or bright.
ESP-Claw automatically reads data from the light sensor via the SCI module and handles the physical-quantity conversion. It then evaluates ambient brightness from the real-time data and context, and returns the corresponding light level. This step is critical: from here on, ESP-Claw is no longer merely "receiving text", it is truly "observing the physical environment".
Once the K10 recognizes light-intensity data, configure it to decide the lighting strategy on its own. Send the following message in the chat tool:
I have connected a 7-LED RGB light strip to Port P1 (GPIO2) of the UNIHIKER K10. Please create an adaptive lighting-control strategy that automatically adjusts brightness according to ambient light intensity, and switches light colors based on time, to realize adaptive home-scene lighting.
ESP-Claw parses the natural-language instruction, automatically generates the GPIO control logic, and executes the lighting strategy when conditions are met.
At this point the system is no longer a simple automatic lamp: it behaves as a genuine AI ambient-lighting Agent that continuously senses environmental changes and decides lighting behavior from real-time conditions.
Traditional smart-home automation mostly follows rigid logic such as "turn on the light if brightness falls below a threshold". What sets ESP-Claw apart is its LLM-powered comprehension: it can weigh additional factors such as time, weather, user habits, and historical environment data to judge whether lighting is actually needed, and at what brightness and atmosphere. That is the core difference between an AI Agent and conventional IoT automation.
SummaryBy reading light-sensor data through the SCI module and leveraging ESP-Claw's natural-language understanding, this project forms a complete closed loop from environmental perception to active control. The light sensor detects real-world light changes, the SCI module unifies the data, ESP-Claw interprets the environment and generates control commands, and the UNIHIKER K10 executes the RGB lighting. Once ESP-Claw can "understand light", the fixture is no longer limited to on/off: it becomes an AI lighting Agent that perceives its surroundings, responds proactively, and truly interacts with the physical world.







Comments