![](/media/cache/profiles/logo_uOArsqL.png.50x50_q85.png)
This demonstrates some of the capabilities of the MAX44000. It is written to work with the ARD2PMD adapter board and the MAX44000PMB1. It uses the standard Arduino pin names and will compile for most Arduino form-factor mbed boards.
This demonstrates some of the capabilities of the MAX44000.
This is written to work with the ARD2PMD adapter board and the MAX44000PMB1. It uses the standard Arduino pin names and it will compile for most Arduino form-factor mbed boards.
Some boards use D13 for an LED signal, so this example uses the second row (row B, pins 7 through 12) of the Pmod connector.
- LED1 toggles when something is first detected by the proximity sensor.
- LED2 indicates when the Ambient Light Sensor reads grater than alsLim.
- LED3 will stay on whenever something is detected by the proximity sensor and stay on for an additional 5s after it is no longer detected.
The following boards have been tested to work:
- MAX32600MBED
- FRDM-KL25Z
- FRDM-K64F
- Seeeduino Arch (LEDs inverted)
- Seeeduino Arch Pro
- ST Nucleo F401RE (only one LED, inverted)
Revision 5:2a360754fea6, committed 2016-04-08
- Comitter:
- gsteiert
- Date:
- Fri Apr 08 22:37:02 2016 +0000
- Parent:
- 4:226ef11c3ef4
- Commit message:
- Updated mbed library. ; Replaced MAX14661 library with Ard2Pmod Library. ; Added MAX32600MBED to list of tested boards.
Changed in this revision
diff -r 226ef11c3ef4 -r 2a360754fea6 MAX14661.lib --- a/MAX14661.lib Mon Jun 30 22:32:02 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/gsteiert/code/MAX14661/#c3525ee2d636
diff -r 226ef11c3ef4 -r 2a360754fea6 ard2pmod.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ard2pmod.lib Fri Apr 08 22:37:02 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/teams/Maxim-Integrated/code/ard2pmod/#abb327ca5580
diff -r 226ef11c3ef4 -r 2a360754fea6 main.cpp --- a/main.cpp Mon Jun 30 22:32:02 2014 +0000 +++ b/main.cpp Fri Apr 08 22:37:02 2016 +0000 @@ -11,6 +11,7 @@ * and stay on for an additional 5s after it is no longer detected. * * The following boards have been tested to work: + * MAX32600MBED * FRDM-KL25Z * FRDM-K64F * Seeeduino Arch (LEDs inverted) @@ -22,9 +23,8 @@ */ #include "mbed.h" -#include "MAX14661.h" +#include "ard2pmod.h" -MAX14661 mux(D14, D15); I2C i2c(D14, D15); DigitalOut tog(LED1); DigitalOut als(LED2); @@ -40,9 +40,7 @@ char cmd[2]; int alsData; - // SDA (D14) + PB4 (D7) SCL (D15) + PB3 (D6) - mux.setAB((MAX14661::SW10 | MAX14661::SW08), - (MAX14661::SW09 | MAX14661::SW07)); + Ard2Pmod ard2pmd(Ard2Pmod::PMOD_TYPE_I2C_B); // Configure Ard2Pmod board for I2C on row B cmd[0] = 0x02; // Receive Register cmd[1] = 0xFC; // 1.56ms, 1x
diff -r 226ef11c3ef4 -r 2a360754fea6 mbed.bld --- a/mbed.bld Mon Jun 30 22:32:02 2014 +0000 +++ b/mbed.bld Fri Apr 08 22:37:02 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/99a22ba036c9 \ No newline at end of file