Being a teenager who has regular online classes I feel a constant strain in my eyes and that is due to harmful rays coming from the laptops screen and its not just the classes after that when we play on pc or do homework our eyes are still getting weak so to solve this I made this project. It works based on ultrasonic sensor which calculates the distance, this projects uses python to reduce the brightness so without further delay lets proceed
so the first thing required is the pyserial library for python and obviously python 3.9
so to download pyserial either use command prompt (for windows) or you can directly download it using this link https://pypi.org/project/pyserial/ (i prefer using command prompt)
so for command prompt copy this command
pip install pyserial
and open command prompt
as I have already downloaded it, this is the screen I get but for You the download process shall start
the second thing required is the screen brightness control library for python the link is https://pypi.org/project/screen-brightness-control/
and obviously the command to download using command prompt is pip install screen-brightness-control
You can use either
now for the connections they are very simple
the 5v goes to 5v of sensor
gnd to gnd
trigger pin to pin 9
echo pin to pin 8
so this was all thanks for reading and giving me your precious time
Comments
Please log in or sign up to comment.