(SKU:RB-02S018)SD Read-Write Module

From ALSRobot-Wki
Jump to: navigation, search
Sd11.jpg

Contents

Product overview

In 2014 the latest Arduino SD Card v2.0 (SD Card read and write memory module v2.0) is the most commonly used storage module, interactive media equipment using SPI interface design easy to plug type, PCB zedoary processing technology, the onboard power supply module, can observe real-time power supply situation, filtering decoupling is realized by using tantalum electrolytic capacitor, all signal circuit impedance matching, and using appropriate resistance ringing elimination (parasitic oscillation) processing. This module can pass 6 p dupont line straight into the Arduino Sensor shields V5.0 Sensor extension board or Arduino MEGA Sensor shields V1.0 Sensor extension, so as to complete with the Arduino Duemilanove 2009 controller, the Arduino Mega1280 controller hardware connection, write the corresponding Arduino program can realize various sensors (e.g., digital temperature Sensor, analog temperature Sensor) data record and store instructions read the function such as robot movement, through the card reader read the SD card data, can be analyzed using easily. SD card is SecureDigitalCard - secure digital card, by panasonic, Toshiba and SANDISK company jointly developed in the United States, has a large capacity, high performance, security, and other characteristics of multi-functional storage card. It is our most commonly used memory card, digital camera, MP3 player, reader, GPS device can find it.

specification

  1. Working voltage :4.8v-12v
  2. Working voltage:32.5mm×39mm
  3. interface type:SPI
  4. Memory card type:Standard SD card
  5. weight:8g

Method of use

Pin definition

SD1.jpg
  • MISO:The main device, data output, the input from the device
  • SCK:clock signal
  • SS:Can make the signal from the device
  • MOSI:The main device data input, data output from the device
  • GND:-
  • 5V: +

Connection methods

S ports from the I/O port of the controller. 5 v &gnd received power of + 5 v &gnd respectively.

Application of routine

sample code

#include <SD.h>

const int POW_PIN =8;

void setup()
{
  Serial.begin(9600);
  Serial.println("Initializing Card");
  
  pinMode(CS_PIN, OUTPUT);
 

  pinMode(POW_PIN, OUTPUT); 
  digitalWrite(POW_PIN, HIGH);
 
  if (!SD.begin(CS_PIN))
  {
    Serial.println("Card Failure");
    return;
  }
  Serial.println("Card Ready"); 
}

void loop()
{
  long timeStamp = millis();
  String dataString = "Hello There!";
 
  
  File dataFile = SD.open("log.csv", FILE_WRITE);
  if (dataFile)
  {
    dataFile.print(timeStamp);
    dataFile.print(",");
    dataFile.println(dataString);
    dataFile.close(); 
  
 
    Serial.print(timeStamp);
    Serial.print(",");
    Serial.println(dataString);
  }
  else
  {
    Serial.println("Couldn't open log file");
  }
  delay(5000);
} 

Application effect

LED module connected into Arduino digital 13, LOW, HIGH light. If the LED module in the Arduino PWM mouth, can through the analogWrite (val) statements control the brightness of the LED module.

Products related to recommend

Buy address[1]

Personal tools
Namespaces

Variants
Actions
Navigation
Tools