Forgot to mention I worked this out on a spreadsheet, I just can't get the same results on the Picaxe.
"Touched" at B7 uses an Excel IF formula: =IF(B4 >B6, "Touched", "Not") so I can play with the Detect and Threshold values.
"Touched" at B17 uses =IF(B16 >25, "Touched", "Not touched")...