Library for SOMO II sound module (http://www.4dsystems.com.au/product/SOMO_II/) For use with stateScript (https://developer.mbed.org/users/mkarlsso/code/stateScript_v2/)

Dependents:   stateScript_v2_karpovalab Nucleo_statescript stateScript_v2

Committer:
alustig3
Date:
Thu Jan 28 16:39:06 2016 +0000
Revision:
0:a4f14eadd0df
Child:
1:5a7359b415c8
SOMO II sound module library, initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
alustig3 0:a4f14eadd0df 1 // SOMO II sound module http://www.4dsystems.com.au/product/SOMO_II/
alustig3 0:a4f14eadd0df 2 #ifndef SOMO_H
alustig3 0:a4f14eadd0df 3 #define SOMO_H
alustig3 0:a4f14eadd0df 4
alustig3 0:a4f14eadd0df 5 #include <mbed.h>
alustig3 0:a4f14eadd0df 6
alustig3 0:a4f14eadd0df 7
alustig3 0:a4f14eadd0df 8 //******************LIBRARY DEFINED PINS (don't modify)*******************//
alustig3 0:a4f14eadd0df 9 //General definitions
alustig3 0:a4f14eadd0df 10 #define audioOFF 0
alustig3 0:a4f14eadd0df 11 #define audioON 1
alustig3 0:a4f14eadd0df 12 #define RESET 13
alustig3 0:a4f14eadd0df 13 #define TX 1
alustig3 0:a4f14eadd0df 14 #define RX 0
alustig3 0:a4f14eadd0df 15 #define DISABLE 0
alustig3 0:a4f14eadd0df 16 #define ENABLE 1
alustig3 0:a4f14eadd0df 17 #define HALFX 0
alustig3 0:a4f14eadd0df 18 #define ONEX 1
alustig3 0:a4f14eadd0df 19 #define ONEPOINTFIVEX 2
alustig3 0:a4f14eadd0df 20 #define TWOX 3
alustig3 0:a4f14eadd0df 21 #define MAX 0xFF
alustig3 0:a4f14eadd0df 22 #define MED 0xE0
alustig3 0:a4f14eadd0df 23 #define MIN 0x00
alustig3 0:a4f14eadd0df 24
alustig3 0:a4f14eadd0df 25
alustig3 0:a4f14eadd0df 26 //**************************************************************************
alustig3 0:a4f14eadd0df 27 // class SOMO SOMO.h
alustig3 0:a4f14eadd0df 28 // This is the main class. It shoud be used like this : SOMO audio(p13,p14);
alustig3 0:a4f14eadd0df 29
alustig3 0:a4f14eadd0df 30 class SOMO{
alustig3 0:a4f14eadd0df 31
alustig3 0:a4f14eadd0df 32 public:
alustig3 0:a4f14eadd0df 33
alustig3 0:a4f14eadd0df 34 SOMO(PinName TXPin, PinName RXPin);
alustig3 0:a4f14eadd0df 35
alustig3 0:a4f14eadd0df 36 void init();
alustig3 0:a4f14eadd0df 37
alustig3 0:a4f14eadd0df 38 void playTrackName(char[]);
alustig3 0:a4f14eadd0df 39
alustig3 0:a4f14eadd0df 40 void playTrackNum(unsigned char);
alustig3 0:a4f14eadd0df 41
alustig3 0:a4f14eadd0df 42 void stopTrack();
alustig3 0:a4f14eadd0df 43
alustig3 0:a4f14eadd0df 44 void volume(unsigned char);
alustig3 0:a4f14eadd0df 45
alustig3 0:a4f14eadd0df 46 void reset();
alustig3 0:a4f14eadd0df 47
alustig3 0:a4f14eadd0df 48
alustig3 0:a4f14eadd0df 49 protected :
alustig3 0:a4f14eadd0df 50
alustig3 0:a4f14eadd0df 51 Serial _serialSOMO;
alustig3 0:a4f14eadd0df 52
alustig3 0:a4f14eadd0df 53 };
alustig3 0:a4f14eadd0df 54
alustig3 0:a4f14eadd0df 55 #endif