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

Add support for 4 wire resistive touchscreen without controller (AEGHB-363) #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dvosully
Copy link
Contributor

Adds support for 4-wire resistive touchscreens connected directly to the microcontroller (ie. without using an SPI or I2c touchscreen controller chip).
Uses 2x ADC pins and 2x GPIO pins.

@CLAassistant
Copy link

CLAassistant commented Dec 18, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@alic-maker
Copy link
Contributor

Thank you for your contribution. That's good. Do you have some descriptions about how to connect the hardware and use it? That will facilitate other developers to use or test the driver.

@dvosully
Copy link
Contributor Author

I'll add a minimal example in a few days.

The short version is connect Y+ and X- of the touchscreen to (digital output capable) ADC pins, and Y- and X+ to digital output pins.

Enable the RES4W driver in the menuconfig, then initialise in exactly the same manner as the existing touchscreen drivers, populating the configuration structure with the gpio pin numbers the touchscreen is connected to.

After that it's no different to the other existing touchscreen drivers. Calibrate and use.

@dvosully
Copy link
Contributor Author

dvosully commented Dec 8, 2022

I have updated the PR to be based off the current master, and improved the behaviour around sample averaging/filtering.

I have also added a test case to touch_test.c

The "Touch RES4W test" should work if you connect a resistive touch panel directly to the ESP32 and connect Y+ to GPIO32, Y- to GPIO26, X+ to GPIO25 and X- to GPIO33. Use the same ILI9341 display as the other test cases use with the same configuration.

@github-actions github-actions bot changed the title Add support for 4 wire resistive touchscreen without controller Add support for 4 wire resistive touchscreen without controller (AEGHB-363) Aug 30, 2023
@espzav
Copy link
Contributor

espzav commented Sep 5, 2023

@dvosully Thank you for your work. We have component esp_lcd_touch here https://github.com/espressif/esp-bsp/tree/master/components/lcd_touch/esp_lcd_touch and it will be nice to add into it. Or maybe only use this component and make new touch driver esp_lcd_touch_adc like another LCD touch drivers here: https://github.com/espressif/esp-bsp/tree/master/components/lcd_touch
And I think, that it should be inside BSP repository too, there are all LCD and touch drivers.

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants