Whadda WPI304N Manual

Microsd card logging shield for arduino

Advertisement

Quick Links

MANUAL
microSD Card Logging Shield for Arduino®
EN
WPI304N
whadda.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the WPI304N and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Whadda WPI304N

  • Page 1 MANUAL microSD Card Logging Shield for Arduino® WPI304N whadda.com...
  • Page 2: Safety Instructions

    If in doubt, contact your local waste disposal authorities. Thank you for choosing Whadda! Please read the manual thoroughly before bringing this device into service. If the device was damaged in transit, do not install or use it and contact your dealer.
  • Page 3: What Is Arduino

    What is Arduino® ® Arduino is an open-source prototyping platform based on easy-to-use hardware and boards are able to read inputs – light-on sensor, a finger on a button or a ® software. Arduino Twitter message – and turn it into an output – activating of a motor, turning on an LED, publishing something online.
  • Page 4 Wiring ® ® Logging shield To Arduino To Arduino Mega CS (cable select) SCK (CLK) MOSI MISO 5V (4.5V-5.5V)
  • Page 5: Circuit Diagram

    Circuit Diagram...
  • Page 6: Operation

    Operation Introduction The WPI304N SD card module is especially useful for projects that require data logging. Arduino ® can create a file onto an SD card to write and save data, using the standard SD ® library from Arduino IDE. The WPI304N module uses the SPI communication protocol.
  • Page 7 Using the SD card module Insert the formatted microSD card in the SD card module. Connect the SD card module to the ® Arduino Uno as shown in the circuit below, or check the pin assignment table in a previous section.
  • Page 8 Reading and writing data onto the microSD card The SD library provides useful functions which allows to easily write onto and read from an SD card. Open the ReadWrite example from File → Examples → SD → ReadWrite and upload ®...
  • Page 9 Serial.begin(9600); while (!Serial) { // wait for serial port to connect. Needed for native USB port only Serial.print("Initializing SD card..."); (!SD.begin(4)) { Serial.println("initialization failed!"); while (1); Serial.println("initialization done."); // open the file. note that only one file can be open at a time, // so you have to close this one before opening another.
  • Page 10 Once the code is uploaded and everything is okay, the following window appears on the serial monitor. This indicates reading/writing was successful. To check about the files on the SD card, use Notepad to open the TEST.TXT file on the microSD card. Following data appears in .txt format:...
  • Page 11 NonBlockingWrite.ino example In the original example NonBlockingWrite code, change line 48 if (!SD.begin()) { if (!SD.begin(4)) { Also, add following lines after line 84: // print the buffer length. This will change depending on when // data is actually written to the SD card file: Serial.print("Unsaved data buffer length (in bytes): ");...
  • Page 12 32. String buffer; unsigned long lastMillis = 0; void setup() { Serial.begin(9600); while (!Serial); Serial.print("Initializing SD card..."); // reserve 1kB for String used as a buffer buffer.reserve(1024); // set LED pin to output, used to blink when writing pinMode(LED_BUILTIN, OUTPUT); // init the SD card (!SD.begin(4)) { Serial.println("Card failed, or not...
  • Page 13 // print the buffer length. This will change depending on when // data is actually written to the SD card file: Serial.print("Unsaved data buffer length (in bytes): "); Serial.println(buffer.length()); // note the time that the last line was added to the string lastMillis = now;...
  • Page 14 Modifications and typographical errors reserved - © Velleman Group nv. WPI304N_v01 Velleman Group nv, Legen Heirweg 33 - 9890 Gavere...

Table of Contents