Demonstrates the MAX44000 library and some of the features of the MAX44000
Dependencies: MAX44000 ard2pmod mbed
Fork of ALS_ARD2PMOD_Demo by
MAX44000PMB1 Demonstration
This demonstrates some of the capabilities of the MAX44000. This is written to work with the MAXREFDES72# adapter board and the MAX44000PMB1 peripheral module. It uses the standard Arduino pin names and it will compile for most arduino form-factor mbed boards. To run this demonstration you will need:
- MAX44000PMB1 Ambient Light / Proximity Sensor Peripheral Module
- MAXREFDES72# Pmod Adapter for Arduino Platforms
- An mbed enabled board with an Arduino compatible socket. We recommend the MAX32600MBED
In this demonstration the LEDs are changed based on data from the sensor.
- LED1 toggles when something is first detected by the proximity sensor.
- LED2 indicates when the Ambient Light Sensor reads greater than a set value (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.
Note: 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.
Tested platform boards
Links to external supporting material
- MAX44000PMB1 Ambient Light / Proximity Sensor Peripheral Module
- MAXREFDES72# Pmod Adapter for Arduino Platforms
- MAX32600MBED
Revision 13:fb522023a522, committed 2016-10-19
- Comitter:
- switches
- Date:
- Wed Oct 19 17:11:00 2016 +0000
- Parent:
- 12:6e126d08713c
- Commit message:
- Changed drive strength to 10mA (down from 110mA). This reduces the sensitivity and range of the proximity sensor, but it is compatible with MAX44000PMB1 boards that were built with 33 Ohm resistors inline with the power supply.
Changed in this revision
MAX44000.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 |
diff -r 6e126d08713c -r fb522023a522 MAX44000.lib --- a/MAX44000.lib Thu May 05 17:35:12 2016 +0000 +++ b/MAX44000.lib Wed Oct 19 17:11:00 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/MaximIntegrated/code/MAX44000/#91f97c274e89 +https://developer.mbed.org/teams/MaximIntegrated/code/MAX44000/#a9f09252653a
diff -r 6e126d08713c -r fb522023a522 main.cpp --- a/main.cpp Thu May 05 17:35:12 2016 +0000 +++ b/main.cpp Wed Oct 19 17:11:00 2016 +0000 @@ -34,7 +34,7 @@ { Ard2Pmod ard2pmod(Ard2Pmod::PMOD_TYPE_I2C_B); // Configure ard2pmod multiplexer for I2C row B (bottom row) - max44000.init(MAX44000::MODE_ALS_PROX, MAX44000::ALSTIM_64X, MAX44000::ALSPGA_1X, MAX44000::DRV_110); + max44000.init(MAX44000::MODE_ALS_PROX, MAX44000::ALSTIM_64X, MAX44000::ALSPGA_1X, MAX44000::DRV_10); bool lastProx = false; int offDelay = 0;