Skip to content

QuecPython/solution-Knob-Control-Brightness

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Knob-Control-Brightness Solution for QuecPython

中文 | English

Welcome to the QuecPython Knob Light Solution warehouse! This repository provides a comprehensive solution for implementing knob controlled lights using QuecPython.

Table of Contents

Introduction

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.

Features

  • Cycle breathing light : LED light gradually brightens, then gradually dimmed
  • Knob Control : Change the LED light by turning the knob

Getting Started

Prerequisites

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:

    • USB driver for the QuecPython module
    • QPYcom debugging tool
    • QuecPython firmware and related software resources
    • Python text editor (e.g., VSCode, Pycharm)

Installation

  1. Clone the Repository:

    git clone https://github.com/QuecPython/solution-Knob-Control-Brightness
    cd solution-Knob-Control-Brightness
  2. Flash the Firmware:

    Follow the instructions to flash the firmware to the development board.

Running the Application

  1. Connect the Hardware:

    • Connect the development board to the USB port of your computer using a USB cable
  2. 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.
  3. 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.

Directory Structure

solution-Knob-Control-Brightness/
├── code/
│   ├── demo.py        		# Run Script
├── LICENSE					#license file 
├── READMEZH.md            
└── README.md				

Contribution

We welcome contributions to improve this project! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add your feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a Pull Request.

License

This project is licensed under the Apache License. See the LICENSE file for details.

Support

If you have any questions or need support, please refer to the QuecPython documentation or open an issue in this repository.

About

Solution Knob Control Brightness

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages