Skip to content

Instantly share code, notes, and snippets.

@boochow
Created November 4, 2018 16:11
Show Gist options
  • Save boochow/b1871e268b4c883a5e4ce56629797e55 to your computer and use it in GitHub Desktop.
Save boochow/b1871e268b4c883a5e4ce56629797e55 to your computer and use it in GitHub Desktop.
from machine import SD
import os
sd = SD()
os.mount(sd, '/sd')
os.chdir('/sd')
os.listdir()
f=open('wtest2.txt','w')
f.write("MicroPython!")
f.close()
f=open('wtest2.txt','r')
f.read()
f.close()
os.remove('wtest2.txt')
os.listdir()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment