SdOne - SD Card reader
This module adds a SD Card connector to your node.IT stack. It allows you to insert one SD Card, which gives your system the possibility to store massive amounts of data. Using a file system you can access the data just like you would in a standard computer by simply opening and closing files.
The board uses the SPI interface of the Node.IT stack to communicate with the Micro SD Card. The SPI pins are mapped as follows:
|10||GPIO14||SCK||Syncronous Data Clock|
|11||GPIO12||MISO||Master Input / Slave Output - Transfers data from the SD Card to the Host|
|12||GPIO13||MOSI||Master Output / Slave Input - Transfers data from the Host to the SD Card|
|14||GPIO15||CS||Chip Select - Selects the memory card for data transfers|
The Micro SD Card connector is of a push / pull type with a soft locking mechanism of the card.
When using this module together with other modules that are using I2C make sure those modules are configured to work together with an SPI enabled module. This essentially means that you need to make sure that the I2C module is using IO0 as the serial clock
This board has only one jumper, SJ1. It allows you to enable the card insertion signal to you node.IT controller. When the jumper is enabled it connects the card inserted signal to GPIO4.
Together with the ESP210 the SdOne module is fully Arduino compatible. All of the SD examples found in the Arduino IDE will work provided that you change the chip select pin from 4 to 15.
In the following line
const int chipSelect = 4;
const int chipSelect = 15;
and you are all set.
Here are some links to the SD Card examples in the Arduino IDE:
- Display various information about the SD Card
- Creates a simple data logger that writes data to the SD Card
- Dumps a file on the terminal
- Creates and destroys a file on the SD Card
- Lists the files found in the root directory
- Reads and writes data to a file on the SD Card
Using SPI and I2C in the same system
By default both the SPI interface and the I2C interface share the same clock which creates a problem when both interfaces are required in a system. In this case you need to use the optional I2C SCL pin (GPIO0) in order to avoid this collision. All +One modules are prepared for this and can be reconfigured by reworking a solder jumper on each board. Read more about this in the respective module wiki page.
If you are using the ESPD21 controller module you only have the option to use the optional SCL pin GPIO0, so in this case all +One modules need to be reworked.