angelamf / Changing-the-Screen-Brightness

Automatic brightness adjustment according to external brightness from an LDR.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

😷 β˜• πŸ’» Quarentine Project #0 - Automatic brightness adjustment according to external brightness.

GitHub author GitHub last commit GitHub repo size GitHub license GitHub top language GitHub count language

πŸ”† Automatic brightness adjustment according to external brightness from an LDR on an Arduino.

βš™ Behavior

Simple Python3 application that receives the external luminance values sent by the microcontroller via Serial.

An Arduino UNO with an LDR sensor was used, connected to the analog port A0, as shown in the schematic below, connected to the computer.

Schematic

To run the application, run the following command:

python main.py

Logically the C code should be running on the Arduino connected to the computer.

πŸ“ Comments

  • On Windows, the script automatically takes the video information to control the computer screen brightness from a file.
  • On Linux, the script takes the name of the active display automatically.

πŸš€ Tecnologies

We use Python3 in the desktop application and C in the application that will run on Arduino.

πŸ”¨ Dependencies

We use the library pyserial for communication between the Arduino and the computer.

To install this dependency you can use the following command:

pip install pyserial

Make sure you have pip and Python3 installed on your computer.

Made with πŸ’™, C and Python

About

Automatic brightness adjustment according to external brightness from an LDR.

License:MIT License


Languages

Language:Python 92.0%Language:C++ 8.0%