Crowduino M0-SD

From Elecrow
Jump to: navigation, search

Contents

Description

The Crowduino M0-SD is a 32-bit extension of the Arduino UNO platform.This board also powered by Atmel’s SAMD21 MCU, featuring a 32-bit ARM Cortex® M0 core. The power of its Atmel’s core gives this board an upgraded flexibility and boosts the scope of projects one can think of and make; moreover, it makes the M0 the ideal educational tool for learning about 32-bit application development. With the new Crowduino M0-SD board, the more creative individual will have the potential to create one’s most imaginative and new ideas for IoT devices, wearable technologies, high tech automation, wild robotics and other not yet thinkable adventures in the world of makers.

Model ACM36620M

600px

Summary

Microcontroller ATSAMD21G18
Operating Voltage 3.3V
Input Voltage (recommended) 5-15V
Digital I/O Pins 20 (of which 12PINs provide PWM output)
Analog Input Pins 6 + 1 DAC
DC Current per I/O Pin 7mA
Flash Memory 256 KB
SRAM 32 KB (ATmega328)
Clock Speed 48MHz
Power Consumption 44 mA

Features

  • SD card for saving more data
  • Each of the 14 digital i/o pins on the M0 can be used as an input or output
  • The ATSAMD21G18 has 256 KB of flash program memory (with 4 KB used for the bootloader)
  • 32 KB of SRAM and up to 16KB by emulation of EEPROM
  • USB Overcurrent Protection
  • The Crowduino M0-SD can be programmed with the Arduino software
  • The SAMD21 also supports TWI and SPI communication
  • The Crowduino- M0-SD is ideal for projects demanding high computing power.

Interface Function

Crowduino M0-SD2 interface.jpg

Usage

Before you use the Crowduino M0-SD board you should download the newest Arduino IDE. You can download from here

Install Driver

After you complete the download of Arduino IDE,unzip the Compressed file,and run the file: Arduino1.7.x -> Drivers -> dpinst-amd64.exe
Note: Before you install the driver you should connect the Crowduino M0-SD board to your computer by USB caple.

Card Info of SD

There is a SD card slot on the M0-SD card board, with which you can easily use SD card to record and thus to read data on the SD card.The SD card uses the SPI interface (D10/D11/D12) plus a CS Pin (D4) to cominicate with the main microcontroller ATSAMD21G18.
And then open the Arduini IDE that you have download,choose File->Examples->SD->CardInfo, download the program to the Crowduino M0-SD.

#include <SPI.h>
#include <SD.h>

// set up variables using the SD utility library functions:
Sd2Card card;
SdVolume volume;
SdFile root;

// change this to match your SD shield or module;
// Arduino Ethernet shield: pin 4
// Adafruit SD shields and modules: pin 10
// Sparkfun SD shield: pin 8
const int chipSelect = 4;

void setup()
{
  // Open serial communications and wait for port to open:
  SerialUSB.begin(9600);
  while (!SerialUSB) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  SerialUSB.print("\nInitializing SD card...");
  // On the Ethernet Shield, CS is pin 4. It's set as an output by default.
  // Note that even if it's not used as the CS pin, the hardware SS pin
  // (10 on most Arduino boards, 53 on the Mega, 14 on Leonardo) must be left as an output
  // or the SD library functions will not work.


  // we'll use the initialization code from the utility libraries
  // since we're just testing if the card is working!
  if (!card.init(SPI_HALF_SPEED, chipSelect)) {
    SerialUSB.println("initialization failed. Things to check:");
    SerialUSB.println("* is a card is inserted?");
    SerialUSB.println("* Is your wiring correct?");
    SerialUSB.println("* did you change the chipSelect pin to match your shield or module?");
    return;
  } else {
    SerialUSB.println("Wiring is correct and a card is present.");
  }

  // print the type of card
  SerialUSB.print("\nCard type: ");
  switch (card.type()) {
    case SD_CARD_TYPE_SD1:
      SerialUSB.println("SD1");
      break;
    case SD_CARD_TYPE_SD2:
      SerialUSB.println("SD2");
      break;
    case SD_CARD_TYPE_SDHC:
      SerialUSB.println("SDHC");
      break;
    default:
      SerialUSB.println("Unknown");
  }

  // Now we will try to open the 'volume'/'partition' - it should be FAT16 or FAT32
  if (!volume.init(card)) {
    SerialUSB.println("Could not find FAT16/FAT32 partition.\nMake sure you've formatted the card");
    return;
  }


  // print the type and size of the first FAT-type volume
  uint32_t volumesize;
  SerialUSB.print("\nVolume type is FAT");
  SerialUSB.println(volume.fatType(), DEC);
  SerialUSB.println();

  volumesize = volume.blocksPerCluster();    // clusters are collections of blocks
  volumesize *= volume.clusterCount();       // we'll have a lot of clusters
  volumesize *= 512;                            // SD card blocks are always 512 bytes
  SerialUSB.print("Volume size (bytes): ");
  SerialUSB.println(volumesize);
  SerialUSB.print("Volume size (Kbytes): ");
  volumesize /= 1024;
  SerialUSB.println(volumesize);
  SerialUSB.print("Volume size (Mbytes): ");
  volumesize /= 1024;
  SerialUSB.println(volumesize);


  SerialUSB.println("\nFiles found on the card (name, date and size in bytes): ");
  root.openRoot(volume);

  // list all files in the card with date and size
  root.ls(LS_R | LS_DATE | LS_SIZE);
}


void loop(void) {

}

result

After you successfully download the program to the board, open the serial port debug window, and you will see the information of the SD card that you have inserted into the SD card slot.
500px

Note

For version Crowduino Uno-SD V1.4, There is a little difference with Arduino UNO that the LED contact with the PB5/D13. PB5/D13 contact the LED with Reverse follower. Please have a look at the following picture. PB5-D13.png That will make the High and LOW values is inverted when control the LED with D13.

Resources

Support

If you have any problem about how to use it, you can connect to us at the bottom-right of bazzer or contact to techsupport@elecrow.com to get technology support.

Personal tools
Namespaces

Variants
Actions
Elecrow Store
Navigation
Elecrow Products
Toolbox