python-on-a-chip online compiler

Dependencies:   mbed TSI

FRDM GPIO

# FRDM-GPIO
# http://mbed.org/users/mbed_official/code/FRDM_GPIO/
import mbed
import sys

gpo = mbed.DigitalOut('PTB8')
led = mbed.DigitalOut('LED_RED')

while 1:
    gpo.write(1)
    led.write(1)    # Off
    sys.wait(2*1000)
    gpo.write(0)
    led.write(0)    # on
    sys.wait(2*1000)

All wikipages