닫기
전체카테고리
  • 반도체/수동소자
    반도체/수동소자
  • 임베디드하드웨어
    임베디드하드웨어
  • 교육용키트
    교육용키트
  • 센서모듈
    센서모듈
  • 입출력모듈
    입출력모듈
  • 전원/파워/배터리
    전원/파워/배터리
  • 기타 하드웨어
    기타 하드웨어
  • 특가상품/리퍼상품
    특가상품/리퍼상품
  • 반도체/수동소자
    반도체/수동소자
  • 임베디드하드웨어
    임베디드하드웨어
  • 교육용키트
    교육용키트
  • 센서모듈
    센서모듈
  • 입출력모듈
    입출력모듈
  • 전원/파워/배터리
    전원/파워/배터리
  • 기타 하드웨어
    기타 하드웨어
  • 특가상품/리퍼상품
    특가상품/리퍼상품
SD카드 리더 모듈 (Arduino SDCard Reader Module) / SD Card Reader 이미지 확대 보기
  • SD카드 리더 모듈 (Arduino SDCard Reader Module) / SD Card Reader

SD카드 리더 모듈 (Arduino SDCard Reader Module) / SD Card Reader

공유
VAT 포함 가격입니다.
판매가
3,190 (부가세 포함)
구매혜택
할인 : 적립 마일리지 :
상품코드
586264
제조사
OEM
구매제한
옵션당 최소 1개
SD카드 리더 모듈 (Arduino SDCard Reader Module) / SD Card Reader
0
총 상품금액
총 할인금액
총 합계금액

SD카드의 데이터를 읽고 쓰기가 가능한 모듈입니다.

SPI통신을 사용합니다.


연결법

  • 5V and Ground
  • CS stands for Chip Select also known as SS- and should be connected to pin10 on the arduino.
  • MOSI is also know as DI and is connected to pin 11
  • MISO is also known as DO and is connected to pin 12
  • SCK is also known as CLK and should be connected to pin 13.

SD 라이브러리는 Adafruit 웹사이트에서 다운로드 받을 수 있습니다.

https://github.com/adafruit/SD


소스 코드

/*

 Requires the SD library from the Adafruit website

 * SD card attached MOSI - pin 11, MISO - pin 12, CLK - pin 13, CS - pin 10

*/


#include


const int chipSelect = 10;


File dataFile;


void setup()

{

  // Open serial communications and wait for port to open:

  Serial.begin(57600);

  while (!Serial) {

    ; // wait for serial port to connect. Needed for Leonardo only

  }

  Serial.print("Initializing SD card...");

  // make sure that the default chip select pin is set to

  // output, even if you don't use it:

  pinMode(SS, OUTPUT);


  // see if the card is present and can be initialized:

  if (!SD.begin(chipSelect)) {

    Serial.println("Card failed, or not present");

    // don't do anything more:

    while (1) ;

  }

  Serial.println("card initialized.");


  // Open up the file we're going to log to!

  // create a new file

  char filename[] = "LOGGER00.TXT";

  for (uint8_t i = 0; i < 100; i++) {

    filename[6] = i / 10 + '0';

    filename[7] = i % 10 + '0';

    if (! SD.exists(filename)) {

      // only open a new file if it doesn't exist

      dataFile = SD.open(filename, FILE_WRITE);

      break;  // leave the loop!

    }

  }


  if (! dataFile) {

    Serial.println("couldnt create file");

  }

  Serial.print("Logging to: ");

  Serial.println(filename);

}


int i = 0;  //Use this for the counter

void loop()

{

  // make a string for assembling the data to log:

  String dataString = "";

  // read three sensors and append to the string:

  for (int analogPin = 0; analogPin < 3; analogPin++) {

    int sensor = analogRead(analogPin);

    dataString += String(sensor);

    if (analogPin < 2) {

      dataString += ",";

    }

  }

  dataFile.println(dataString);

  // print to the serial port too:

  //Serial.println(' ');

  // The line dataFile.flush() will 'save' the file to the SD card after every

  // line of data - this will use more power and slow down how much data

  // you can read but it's safer!

  // If you want to speed up the system, call flush() less often and it

  // will save the file only when called and every 512 bytes - every time a sector on the

  // SD card is filled with data. However, don't depend on the automatic flush!

  i++;

  if (i > 50) { //Call every 50 times

    dataFile.flush();

    i = 0;

  }

  // Take 1 measurement every 10 milliseconds

  delay(10);

}

이미지 확대보기SD카드 리더 모듈 (Arduino SDCard Reader Module) / SD Card Reader

SD카드 리더 모듈 (Arduino SDCard Reader Module) / SD Card Reader
  • SD카드 리더 모듈 (Arduino SDCard Reader Module) / SD Card Reader
닫기

비밀번호 인증

글 작성시 설정한 비밀번호를 입력해 주세요.

닫기

장바구니 담기

상품이 장바구니에 담겼습니다.
바로 확인하시겠습니까?

찜 리스트 담기

상품이 찜 리스트에 담겼습니다.
바로 확인하시겠습니까?

  • 장바구니
  • 최근본상품
  • 위로
  • 아래로

최근 본 상품

  • SD카드 리더 모듈 (Arduino SD...
    3,190
0/2
우측 배너
고객센터

053-588-4080평일상담 : 10:00 ~ 17:00 | 점심시간 : 12:00 ~ 13:00
주말 및 공휴일 휴무

계좌안내

신한은행100-032-613560
예금주 : (주)메카솔루션