Skip to content

Instantly share code, notes, and snippets.

@pedrovhb
Created June 6, 2017 20:44
Show Gist options
  • Save pedrovhb/fe83e2da8cbcb41abf247263c36dd76a to your computer and use it in GitHub Desktop.
Save pedrovhb/fe83e2da8cbcb41abf247263c36dd76a to your computer and use it in GitHub Desktop.
txt = r"""
import machine
import time
led = machine.Pin(2, machine.Pin.OUT)
while True:
led.value(0)
time.sleep(0.5)
led.value(1)
time.sleep(0.2)
"""
f = open('main.py', 'w+')
f.write(txt)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment