Skip to content

Touch Calibration

The NanoVNA-H touchscreen requires calibration to ensure accurate tap detection. This is especially important after replacing the screen or if touch inputs seem offset.

Touchscreen calibration is needed when:

  • Touch responses are offset from tap location
  • Menus are difficult to select
  • After replacing the display
  • After a firmware reset
  1. Tap the screen to open the menu
  2. Navigate to CONFIG
  3. Tap TOUCH CAL
  4. Follow the on-screen prompts
Terminal window
touchcal

This starts the calibration process immediately.

  1. A crosshair appears at the top-left corner
  2. Tap precisely on the center of the crosshair
  3. A crosshair appears at the bottom-right corner
  4. Tap precisely on the center of this crosshair
  5. Calibration completes automatically

After successful calibration:

  1. The device returns to normal operation
  2. Test by tapping different areas of the screen
  3. If still inaccurate, repeat calibration
  4. Save configuration with saveconfig to preserve settings

Touch calibration data is stored in the configuration. To preserve it across power cycles:

Terminal window
saveconfig

Or via menu: CONFIG > SAVE

After calibration, verify accuracy:

Navigate through menus and verify:

  • Menu items respond to direct taps
  • Marker placement works correctly
  • Keypad buttons are responsive
Terminal window
touchtest

This enters a test mode showing raw touch coordinates. Touch different areas and verify the coordinates match the tap location.

To exit touch test: tap rapidly or use the shell to send a command.

Terminal window
# Start touch calibration
touchcal
# Test touch coordinates
touchtest

Touch calibration uses two reference points to calculate:

  • X and Y offset
  • X and Y scaling factors

The calibration compensates for:

  • Panel alignment tolerances
  • Mounting variations
  • Touch controller offsets
  • Ensure the device isn’t in sweep mode (pause first)
  • Try using the shell command touchcal
  • Restart the device and try again
  • Repeat calibration with more careful taps
  • Use a stylus for precision
  • Ensure you tap the exact center of crosshairs
  • Clean the screen surface
  • Check for screen protector interference
  • Verify display is properly seated
  • Try multiple calibration attempts

New screens may have different touch characteristics:

  1. Install new screen
  2. Power on device
  3. Immediately run touch calibration
  4. Save configuration

If the touch becomes unusable and you cannot navigate menus:

  1. Connect via USB
  2. Open serial console
  3. Run touchcal command
  4. Complete calibration using on-screen crosshairs
  5. Run saveconfig to save

The touch calibration stores:

  • _touch_cal[0]: X offset
  • _touch_cal[1]: Y offset
  • _touch_cal[2]: X scale factor
  • _touch_cal[3]: Y scale factor

These values transform raw touch ADC values to screen coordinates.