Skip to content
Get started

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.

Olimex MOD-LCD2.8RTP display with NS2009 touchscreen
NS2009 touchscreen on Olimex MOD-LCD2.8RTP
# Example configuration entry
touchscreen:
id: my_touchscreen
platform: ns2009
calibration:
x_min: 400
x_max: 3700
y_min: 300
y_max: 3700
  • 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 to 40.

  • 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_xy is set) edge.
    • x_max (Required, int): The raw value at the right (or bottom if swap_xy is set) edge.
    • y_min (Required, int): The raw value at the top (or left if swap_xy is set) edge.
    • y_max (Required, int): The raw value at the bottom (or right if swap_xy is set) edge.

    See Calibration for how to find these values.

  • All other options from Touchscreen.