This thesis focuses on setting up a light modulation system, which saves energy in public places. The energy-saving process would be improved by combining with the air conditioning wind modulation system. Generally, the camera can be directly plugged in to one’s personal computers by USB connector, so it can be used easily. We adjust the images by using interface captures like HSL conversion, gray conversion and location tracking. Then we get the best control data to the light, motor, air condition and fan. Finally, computers will send out data to surrounding hardware. The hardware change the light, temperature and carbon dioxide concentration which makes the environment more comfortable in public place. Such system not only saves energy but also improves the quality of our lives. In the lamp brightness modulation, we use RS-232 serial communication to connect the computer with the microcontroller 8051 we used. The brightness would be the input, then we use basis fuzzy control rule to calculate how bright the environment actually need. After that we use microcontroller 8051 to gather the data and then modify the PWM output to get to the brightness we need.