witnessmenow / ESP32-Cheap-Yellow-Display

Building a community around a cheap ESP32 Display with a touch screen
MIT License
1.56k stars 158 forks source link

Example: working version of automatic LCD brightness adjustment #107

Closed 88markus88 closed 4 months ago

88markus88 commented 9 months ago

Main work is done in

byte handleBrightness(int mode, int minBrightness, int maxBrightness, int averageCnt, bool debugOut)

mode: 0: manual setting, in the example by touching upper right and lower right corners of the screen 1: linear setting 2 logarithmic setting (recommended)

minBrightness, maxBrightness: limits of LCD brightness to be used (1..255) averageCnt: determines the number of times to be averaged. lower=faster (10) debugOut: if true, print actual values on screen

witnessmenow commented 9 months ago

Thank you for the PR!

I like the example but a couple of changes would be good:

88markus88 commented 9 months ago

Hi Brian,

I can certainly change the example to Arduino format, no problem there. However, I have no idea how to fix the readme.md issue. Git told me that there was a merge conflict, and with my limited Git knowledge I just did not get it resolved short of removing it from my local repository - which now has apparently propagated upstream. I had hoped that you can reject that part of the Pull Request - if that is not possible, I am not sure what I can do. I hope that one of these days I can improve my Git, until then I suggest that you simply reject the pull request.

Greetings, Markus

Brian Lough @.***> schrieb am Mi., 3. Jan. 2024, 21:15:

Thank you for the PR!

I like the example but a couple of changes would be good:

  • the readme from the 3d printing folder needs to be restored.
  • It would also be great if the example could be made Arduino compatible, it just involves re-naming the file AutoBrightness.ino and change the src folder to AutoBrightness (and update the platformio.ini to reflect that). It should continue to work with PIO and also Arduino IDE with that

— Reply to this email directly, view it on GitHub https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/pull/107#issuecomment-1875914954, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOKANWUOTFTVJID3VLYBLI3YMW345AVCNFSM6AAAAABBKKFWJ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZVHEYTIOJVGQ . You are receiving this because you authored the thread.Message ID: @.***>

TheNitek commented 4 months ago

You can close this PR, fix everything on your fork and then open another pull request. That might be easier.