###########################
### Code in MicroPython ###
###########################

# VELLEMAN VMA305
# Module with touch, capacitive button which requires a little pressure to activate. The output is the analog signal.

from machine import Pin # For hardware functions
import time # For time functions

touch = Pin(26, Pin.IN, Pin.PULL_UP) # Set pin 26 as an input with internal pull-up resistor

while True: # Infinite loop
    if touch.value() == 0: # Reads the touch's value
        print("Target not touched") # If the target is noy touched
    else:
        print("Target touched") # If the target is touched
    time.sleep(0.25) # Delay