}
delay(500);
for(pin=24;pin<32;pin++){
digitalWrite(pin,LOW);
}
delay(500);
}
Sample Code3: Play WAV in IIS
#include <SPI.h>
#include <Wire.h>
#include <SD.h>
#include <WAV.h>
// set up variables using the SD utility library functions:
Sd2Card card;
const int chipSelect = 4;
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
Serial.print("\nInitializing SD card...");
// 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)) {
Serial.println("initialization failed. Things to check:");
Serial.println("* is a card inserted?");
Serial.println("* is your wiring correct?");
Serial.println("* did you change the chipSelect pin to match your shie
ld or module?");
return;
} else {
Serial.println("Wiring is correct and a card is present.");
}
}
void loop()
{
int ret=WAV_DECODING;
wav.begin("test.wav");
wav.play();
while(ret == WAV_DECODING){
ret = wav.decode();
}
}
Tested Platform:
Windows: win7 32bit/64bit, win8 32bit/64bit, win10 32bit
Linux: Ubuntu 12.04 32bit
Mac book: OSX 10.11
FAQ
Q1. No permission under Linux system
A. Input ’‘’sudo usermod -a -G USER NAME dialout‘’‘ to add user into dialout group. Log out
and log back in
Q2. Where is the missing driving file?
A. In the category driver of sdk.
https://www.dfrobot.com/wiki/index.php/Bluno_M0_Mainboard_SKU:_DFR041612817

DFR0416

Mfr. #:
Manufacturer:
DFRobot
Description:
Development Boards & Kits - ARM Bluno M0 Mainboard
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet