Touch Sensor

A touch sensor pad is used in conjunction with the PICAXE 'touch' commands to determine when a finger has touched the sensor. These can be used to create the equivalent of non-mechanical push switches.

Related Commands:

Print Page

Share

Schematic

PCB

Reading a touch sensor

This program will read a touch sensor connected to input pin C.0 and report the value read in the 'b1' variable.

Code Example:
main:	touch C.0, b1		; Read the touch sensor value
	debug			; Display the value
	pause 1000		; Wait a while
	goto main		; Repeat
Copy Code Submit an Example

Create Module

Touch the coloured dot to activate the touch sensor.

Bill of Materials

DescriptionCodeQty

Simulation

No Image Selected

Submit Your Own Code!

You must be logged in to submit code examples. Login now.