Product Overview

1/29/2018 ESP32 Thing Motion Shield Hookup Guide - learn.sparkfun.com
https://learn.sparkfun.com/tutorials/esp32-thing-motion-shield-hookup-guide?_ga=2.240586115.1022152466.1517244327-204410570.1509632255 9/17
Using the MicroSD Card
The microSD card relies on the libraries packaged with the ESP32 Arduino board files. The best way to garner
knowledge is to go into the source files and read the various header files, or to use the example sketches.
To use the examples directly, make sure you assign the CS pin to 33.
This example also shows how to setup the CD pin as input, and to us it to detect a card. The program will halt during
setup if a card is not detected, or if the card doesn’t mount properly.
If everything’s a go, the LSM9DS1_CSV.ino example will report basic information about the card.
To help with development in the FileSerialExample.ino example, I’ve written a little SD extension library that allows
writing of sequentially numbered files up to a particular size. It behaves like a serial port, so things like .println() can
be used.
Don't run this example! This example requires FileSerial.cpp and FileSerial.h to operate. It is here to show
how similar the file writing operation of these two included files is to a normal serial object. Get the full project
Original Creation: August 13, 2015 by Jim Lindblom
from the LSM9DS1_Basic_I2C.ino library example.
https://github.com/sparkfun/LSM9DS1_Breakout
Hardware setup: This library is intended to be used with a
ESP32 Motion shield connected directly to the ESP32 Thing.
Development environment specifics:
IDE: Arduino 1.8.2
Hardware Platform: ESP32 Arduion Board
This code is beerware. If you see me (or any other SparkFun
employee) at the local, and you've found our code helpful,
please buy us a round!
COPY CODE
/*****************************************************************
LSM9DS1_CSV.ino
This is a modified version of the SD_Test example sketch
included with the Arduino core for the esp32, from
https://github.com/espressif/arduino-esp32
This example:
* Uses the CD pin to check for a card
* Mounts the card
* Prints information about the card.
Use this for a starting place while working with SD cards.
Hardware requirements:
ESP32 Thing attached to Motion Board