NS2009 Touch Screen Controller
The ns2009 touchscreen platform allows using the touch screen controllers based on the NS2009 chip with ESPHome.
The I²C bus is required to be set up in your configuration for this touchscreen to work.
This controller is used in the Olimex MOD-LCD2.8RTP.

# Example configuration entrytouchscreen: id: my_touchscreen platform: ns2009 calibration: x_min: 400 x_max: 3700 y_min: 300 y_max: 3700Configuration Variables
Section titled “Configuration Variables”-
id (Optional, ID): Manually set the ID of this touchscreen.
-
threshold (Optional, int): The pressure it takes for a touch to register. Range:
0-255, defaults to40. -
address (Optional, int): The I²C address of this touchscreen, defaults to
0x48. -
calibration (Required): The NS2009 is a resistive controller, so each panel needs its own calibration. Set the raw values (
0-4095) that match the edges of the screen:- x_min (Required, int): The raw value at the left (or top if
swap_xyis set) edge. - x_max (Required, int): The raw value at the right (or bottom if
swap_xyis set) edge. - y_min (Required, int): The raw value at the top (or left if
swap_xyis set) edge. - y_max (Required, int): The raw value at the bottom (or right if
swap_xyis set) edge.
See Calibration for how to find these values.
- x_min (Required, int): The raw value at the left (or top if
-
All other options from Touchscreen.