Giter Site home page Giter Site logo

wt32_backlight's Introduction

WT32-SC01 Backlight Brightness

This is a very simple project which shows the control of the WT32-SC01 backlight brightness. I couldn't find anything on-line which explained how to control the backlight and it took some trial and error to find the correct pin. I thought I would try and save others the bother by sharing this example.

The WT32-SC01 is an interesting and useful 3.5" TFT touch screen with built in ESP32. It is available from aliexpress.com and other suppliers for less than £$€30. The glass on the screen is thin and fragile, and the device needs to be handled carefully. There is a serious error in the wiring of the USB-C connector which means the device can only be powered by a cable with USB-A on the other end. The error can be corrected with some frighteningly careful soldering: see WT32-SC01 USB C power fix.

The more recent WT32-SC01 Plus has an ESP32 S3.

The project is structured for PlatformIO and VS Code, using the excellent TFT_eSPI library. The essential lines could easily be incorporated into another environment:

Initialisation

ledcSetup(backlightChannel, 100, 8);
ledcAttachPin(23, backlightChannel);

Where backlightChannel is a uint8_t. The number of LEDC channels varies between different ESP32 revisions, but the minimum appears to be 6. This example sets the resolution to 8 bits and the frequency to 100. See Espressif's LED Control (LEDC) for more about LED Control.

Brightness

ledcWrite(backlightChannel, brightness);

Where backlightChannel is the channel attached in initialisation and brightness is, in this example, 0 to 255.

wt32_backlight's People

Contributors

mikethegent avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.