A simple serial test program for the MAX9723 library.

Dependencies:   MAX9723 mbed

Files at this revision

API Documentation at this revision

Comitter:
neilt6
Date:
Fri May 30 19:47:53 2014 +0000
Commit message:
Initial commit

Changed in this revision

MAX9723.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r b141b0729a1b MAX9723.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MAX9723.lib	Fri May 30 19:47:53 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/neilt6/code/MAX9723/#99db25d6f38d
diff -r 000000000000 -r b141b0729a1b main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri May 30 19:47:53 2014 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "MAX9723.h"
+
+//Create a MAX9723 object at the default address (ADDRESS_0)
+MAX9723 amp(p28, p27);
+
+int main()
+{
+    //Try to open the MAX9723
+    if (amp.open()) {
+        printf("Device detected!\n");
+
+        //Configure the MAX9723 for no BassMax, and low gain
+        amp.enabled(true);
+        amp.bassMax(false);
+        amp.maxGain(false);
+        
+        //Set the volume for 50%
+        amp = 0.50;
+    } else {
+        error("Device not detected!\n");
+    }
+}
diff -r 000000000000 -r b141b0729a1b mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri May 30 19:47:53 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/0b3ab51c8877
\ No newline at end of file