아두이노 > SFEMP3Shield - Arduino Library for VS10xx shield

TODAY1,196 TOTAL607,992
사이트 이용안내
Login▼/회원가입
최신글보기 질문게시판 기술자료 동영상강좌

아두이노 센서 ATMEGA128 PWM LED 초음파 AVR 블루투스 LCD UART 모터 적외선


BASIC4MCU | 아두이노 | 아두이노 | SFEMP3Shield - Arduino Library for VS10xx shield

페이지 정보

작성자 키트 작성일2017-09-11 16:47 조회610회 댓글0건

본문

 

Logo
SFEMP3Shield  1.02.14
Arduino Library for VS10xx shield
MP3Shield_Library_Demo.ino File Reference

Example sketch of using the MP3Shield Arduino driver, demonstrating all methods and functions. More...

#include
#include
#include
#include <SFEMP3Shield.h>
Include dependency graph for MP3Shield_Library_Demo.ino:

Go to the source code of this file.

Functions

void setup ()
 Setup the Arduino Chip's feature for our use. More...
 
void loop ()
 Main Loop the Arduino Chip. More...
 
void parse_menu (byte key_command)
 Decode the Menu. More...
 
void help ()
 Print Help Menu. More...
 

Variables

SdFat sd
 Object instancing the SdFat library. More...
 
SFEMP3Shield MP3player
 Object instancing the SFEMP3Shield library. More...
 
uint32_t millis_prv
 

Detailed Description

Example sketch of using the MP3Shield Arduino driver, demonstrating all methods and functions.

Remarks
comments are implemented with Doxygen Markdown format
Author
Bill Porter
Michael P. Flaga

This sketch listens for commands from a serial terminal (like the Serial Monitor in the Arduino IDE). If it sees 1-9 it will try to play an MP3 file named track00x.mp3 where x is a number from 1 to 9. For eaxmple, pressing 2 will play 'track002.mp3'. A lowe case 's' will stop playing the mp3. 'f' will play an MP3 by calling it by it's filename as opposed to a track number.

Sketch assumes you have MP3 files with filenames like "track001.mp3", "track002.mp3", etc on an SD card loaded into the shield.

Definition in file MP3Shield_Library_Demo.ino.

Function Documentation

void help()

Print Help Menu.

Prints a full menu of the commands available along with descriptions.

Definition at line 540 of file MP3Shield_Library_Demo.ino.

void loop()

Main Loop the Arduino Chip.

This is called at the end of Arduino kernel's main loop before recycling. And is where the user's serial input of bytes are read and analyzed by parsed_menu.

Additionally, if the means of refilling is not interrupt based then the MP3player object is serviced with the availaible function.

Note
Actual examples of the libraries public functions are implemented in the parse_menu() function.

Definition at line 122 of file MP3Shield_Library_Demo.ino.

void parse_menu(byte key_command)

Decode the Menu.

Parses through the characters of the users input, executing corresponding MP3player library functions and features then displaying a brief menu and prompting for next input command.

Definition at line 149 of file MP3Shield_Library_Demo.ino.

void setup()

Setup the Arduino Chip's feature for our use.

After Arduino's kernel has booted initialize basic features for this application, such as Serial port and MP3player objects with .begin. Along with displaying the Help Menu.

Note
returned Error codes are typically passed up from MP3player. Whicn in turns creates and initializes the SdCard objects.
See Also
Error Codes

Definition at line 65 of file MP3Shield_Library_Demo.ino.

Variable Documentation

uint32_t millis_prv

Definition at line 139 of file MP3Shield_Library_Demo.ino.

SFEMP3Shield MP3player

Object instancing the SFEMP3Shield library.

principal object for handling all the attributes, members and functions for the library.

Definition at line 49 of file MP3Shield_Library_Demo.ino.

SdFat sd

Object instancing the SdFat library.

SdFat sd;.

principal object for handling all SdCard functions.

Definition at line 42 of file MP3Shield_Library_Demo.ino.



https://github.com/madsci1016/Sparkfun-MP3-Player-Shield-Arduino-Library/blob/master/SFEMP3Shield/SFEMP3Shield.h 

댓글 0

조회수 610

등록된 댓글이 없습니다.

아두이노HOME > 아두이노 > 전체 목록

게시물 검색

2019년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2018년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
Privacy Policy
MCU BASIC ⓒ 2017
모바일버전으로보기