Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for backlight on Makerfab ESPTFT35(CA) #335

Closed
mmccool opened this issue May 9, 2022 · 3 comments
Closed

Support for backlight on Makerfab ESPTFT35(CA) #335

mmccool opened this issue May 9, 2022 · 3 comments
Labels
enhancement New feature or request waiting feedback Feedback is required before the issue can be worked upon further

Comments

@mmccool
Copy link

mmccool commented May 9, 2022

Is your feature request related to a problem? Please describe.
Currently openHASP can't control the backlight on the Makerfabs ESPTFT35(CA) board. It's true that the standard board as-shipped is always-on, BUT backlight control can (theoretically) be enabled by soldering two pads together (marked R31 on the board). Technically a 0 Ohm resistor should be used, but a blob of solder or a small wire would (probably) also do the trick. This connects GPIO1 to the backlight control on the display, which means you cannot use TX in the UART (uses the same pin) and therefore disables serial debugging, but no big deal. See Makerfabs/Project_Touch-Screen-Camera#8

Describe the solution you'd like
A flag or some build-time configuration option (disabled by default) to allow backlight control using PWM on GPIO1.

Describe alternatives you've considered
Well, I could go in and try to hack the code myself, and then try to upstream it to benefit others, but I'm lazy. If someone points me in the right direction though I can test a solution. I happen to have two boards so I will modify one and leave the other one alone for test purposes. I already have openHASP running on the board and integrated with Home Assistant.

Additional context
This page should also be updated to note that backlight control can be added with a little soldering and configuring, assuming it can be made to work: https://openhasp.haswitchplate.com/0.6.2/devices/makerfabs-tft-touch/

@mmccool mmccool added the enhancement New feature or request label May 9, 2022
@fvanroie
Copy link
Collaborator

I discovered that resistor in the schematics but didn't find it very useful at the time. While technically it can be done, I haven't tested this as I'm not that precise with a soldering iron.

It's not just the debug output as flashing of the ESP32 over UART could be affected too. I'm not sure if that will still work after the resistor is soldered on. Granted that you can upload firmware via OTA but it makes recovery a lot harder. Have you tested flashing the ESP32 with the blob on?

Before delving into the code, I would suggest:

  • Please try openHASP 0.6.3-rc1. It has the option to disable the Serial Port from the Debug Settings
  • The ESP32 will still output some bootloader junk to the pin on boot, but that shouldn't be an issue...
  • There is no Web UI option to set GPIO1 for backlight atm, but you can use the config/gui commands:
  • Publish {"bckl":1} to topic hasp/<plate>/config/gui or api/config/gui REST endoint
  • Reboot

I haven't tried the blob, but that could work. The Web UI won't reflect the selected backlight pin, but that's window dressing which we can address if it works.

@mmccool
Copy link
Author

mmccool commented May 10, 2022

Hmm. Good point about flashing. Let me set up OTA first then (BTW the instructions on how to configure that could be better; I guess it's automatic but there are some OTA options in the configuration include file that I don't know what to do with... if anything). True, I could just set up the PIN as a GPIO without changing the firmware, so let me try as you suggest first to test. Soldering in that resistor is likely to be a bit of a pain but seems doable. Really wish they had provided a jumper, but oh, well. I will have to think if there is some way to solder in something easily switchable...

(Edit: I just realized you created the original issue in the Makerfab repo on this :))

@fvanroie fvanroie added the waiting feedback Feedback is required before the issue can be worked upon further label May 13, 2022
@fvanroie
Copy link
Collaborator

Did you have a chance to test UART with the backlight blob on?

@fvanroie fvanroie closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting feedback Feedback is required before the issue can be worked upon further
Projects
None yet
Development

No branches or pull requests

2 participants