中文 | English
Welcome to the QuecPython Knob Light Solution warehouse! This repository provides a comprehensive solution for implementing knob controlled lights using QuecPython.
QuecPython has launched a solution for PWM dimming, including PWM loop breathing lights and knob control, etc. By calling the interfaces encapsulated by QuecPython, the effect of PWM light control can be achieved with just a few lines of code. Combined with other devices, it can realize the control of light brightness by the device. For example, by using ADC to collect the voltage value of the knob, the duty cycle of PWM can be changed proportionally to achieve the control of light brightness by the knob.
- Cycle breathing light : LED light gradually brightens, then gradually dimmed
- Knob Control : Change the LED light by turning the knob
Before you begin, ensure you have the following prerequisites:
-
Hardware:
- A QuecPython development board
- USB Data Cable (USB-A to USB-C)
- PC (Windows 7, Windows 10, or Windows 11)
-
Software:
-
Clone the Repository:
git clone https://github.com/QuecPython/solution-Knob-Control-Brightness cd solution-Knob-Control-Brightness
-
Flash the Firmware:
Follow the instructions to flash the firmware to the development board.
-
Connect the Hardware:
- Connect the development board to the USB port of your computer using a USB cable
-
Download Code to the Device:
- Launch the QPYcom debugging tool.
- Connect the data cable to the computer.
- Press the PWRKEY button on the development board to start the device.
- Follow the instructions to import all files within the
code
folder into the module's file system, preserving the directory structure.
-
Run the Application:
- Select the
File
tab. - Select the
demo.py
script. - Right-click and select
Run
or use the run shortcut button to execute the script.
- Select the
solution-Knob-Control-Brightness/
├── code/
│ ├── demo.py # Run Script
├── LICENSE #license file
├── READMEZH.md
└── README.md
We welcome contributions to improve this project! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -m 'Add your feature'
). - Push to the branch (
git push origin feature/your-feature
). - Open a Pull Request.
This project is licensed under the Apache License. See the LICENSE file for details.
If you have any questions or need support, please refer to the QuecPython documentation or open an issue in this repository.