Skip to content
Snippets Groups Projects
Select Git revision
  • ce166e6b68b7fafb73a99fd64081f8a4155fe22a
  • wip-bootstrap default
  • dualcore
  • ch3/leds
  • ch3/time
  • master
6 results

machine.SD.rst

Blame
  • user avatar
    Paul Sokolovsky authored
    With currentmodule:: set properly, none are needed. Extra "machine." prefix
    produces wrong indexing data.
    79b40d11
    History
    machine.SD.rst 1.21 KiB

    class SD -- secure digital memory card

    The SD card class allows to configure and enable the memory card module of the WiPy and automatically mount it as /sd as part of the file system. There are several pin combinations that can be used to wire the SD card socket to the WiPy and the pins used can be specified in the constructor. Please check the pinout and alternate functions table. for more info regarding the pins which can be remapped to be used with a SD card.

    Example usage:

    from machine import SD
    import os
    # clk cmd and dat0 pins must be passed along with
    # their respective alternate functions
    sd = machine.SD(pins=('GP10', 'GP11', 'GP15'))
    os.mount(sd, '/sd')
    # do normal file operations

    Constructors

    Methods