MicroPython
Note this page describes how to use a MicroPython.org version of this library with MicroPython
boards. Skip back to the previous page if you're using a CircuitPython board like the Feather M0
express or Adalogger!
Before you get started you'll want to be familiar with the basics of using MicroPython by reading these
guides:
MicroPython Basics: What is MicroPython? (https://adafru.it/pMb)
MicroPython Basics: How to Load MicroPython on a Board (https://adafru.it/pNB)
MicroPython Basics: Load Files & Run Code (https://adafru.it/r2B)
MicroPython Basics: Loading Modules (https://adafru.it/ryf)
Note that SD card support varies greatly for MicroPython boards. A few boards have good native support
built-in:
pyboard
The pyboard is one of the easiest MicroPython boards to use with a microSD card. The board is built with
a small microSD card slot and its firmware will automatically load the card as the root filesystem for the
board. Plug in the card, power up the pyboard and it should automatically use the card as a filesystem to
run scripts, store data, etc. You don't need to buy extra hardware or run any commands!
Check out the pyboard SD card documentation (https://adafru.it/qyB) for more details.
WiPy
The WiPy also makes it easy to use a microSD card with its WiPy expansion board (http://adafru.it/2960).
The expansion board includes a microSD card slot so you can easily plug in a card. With a few lines of
code you can mount the microSD card on the board's filesystem to read and write data, just like with the
pyboard.
Check out the WiPy SD card documentation (https://adafru.it/qyC) for more details.
Other MicroPython boards like the ESP8266 need to use a little more code to work with microSD cards.
Follow the steps below to use MicroPython ESP8266 with a microSD card.
MicroPython ESP8266 SD Card Setup
Before you can use a microSD card with MicroPython on the ESP8266 you'll need to make sure you're
using at least firmware version 1.8.4 or higher . If you aren't familiar with loading MicroPython firmware on
the ESP8266 check out this handy guide for all the details (https://adafru.it/pNB). Be sure to get
MicroPython ESP8266 stable firmware version 1.8.4 or higher from its download page!
Once your board is running MicroPython 1.8.4 or higher there's one more step to enable microSD card
access. You need to manually install a Python module to talk to the SD card. This module is not included
in the MicroPython ESP8266 firmware by default, but it's easy to copy to the board's internal filesystem.
Be sure to read this guide on loading modules (https://adafru.it/ryf) to understand more about how you
can copy modules and load them.