4180 Lab 2

Dependencies:   mbed wave_player Servo 4DGL-uLCD-SE Motor SDFileSystem LSM9DS1_Library_cal PinDetect X_NUCLEO_53L0A1

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers part14.h Source File

part14.h

00001 #include "mbed.h"
00002 #include "SDFileSystem.h"
00003 #include "wave_player.h"
00004 
00005 SDFileSystem sd(p5, p6, p7, p8, "sd");
00006 AnalogOut DACOut(p18);
00007 
00008 wave_player player(&DACOut);
00009 
00010 int run_part14() {
00011     FILE *wave_file = fopen("/sd/sample.wav", "r");
00012     player.play(wave_file);
00013     fclose(wave_file);
00014     return 0;
00015 }