python-on-a-chip online compiler

Dependencies:   mbed TSI

FRDM_TSI

# FRDM_TSI Touch Sensor
# http://mbed.org/users/mbed_official/code/FRDM_TSI/
import sys
import mbed
led = mbed.PwmOut('LED_GREEN');
tsi = mbed.TSISensor()

while 1:
    led.write(1.0 - tsi.readPercentage())
    sys.wait(100)

All wikipages