Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: SOMO.h
- Revision:
- 0:a4f14eadd0df
- Child:
- 1:5a7359b415c8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SOMO.h Thu Jan 28 16:39:06 2016 +0000 @@ -0,0 +1,55 @@ +// SOMO II sound module http://www.4dsystems.com.au/product/SOMO_II/ +#ifndef SOMO_H +#define SOMO_H + +#include <mbed.h> + + +//******************LIBRARY DEFINED PINS (don't modify)*******************// +//General definitions +#define audioOFF 0 +#define audioON 1 +#define RESET 13 +#define TX 1 +#define RX 0 +#define DISABLE 0 +#define ENABLE 1 +#define HALFX 0 +#define ONEX 1 +#define ONEPOINTFIVEX 2 +#define TWOX 3 +#define MAX 0xFF +#define MED 0xE0 +#define MIN 0x00 + + +//************************************************************************** +// class SOMO SOMO.h +// This is the main class. It shoud be used like this : SOMO audio(p13,p14); + +class SOMO{ + +public: + + SOMO(PinName TXPin, PinName RXPin); + + void init(); + + void playTrackName(char[]); + + void playTrackNum(unsigned char); + + void stopTrack(); + + void volume(unsigned char); + + void reset(); + + + protected : + + Serial _serialSOMO; + +}; + +#endif