Data logger: Sensors -> Barometer & temperature (BMP180), Humidity & temp. (RHT03), Sunshine (Cds): Display -> 20 chracters x 4 lines: Strage -> EEPROM (AT24C1024): Special functions -> Enter sleep mode to save current, reading the logging data via serial line
Dependencies: AT24C1024 BMP180 M41T62 RHT03 TextLCD WakeUp mbed
Fork of LPC1114_barometer_with_data_logging by
Please refer following Notebook.
http://mbed.org/users/kenjiArai/notebook/mbed-lpc1114fn28-data-logger/
main.cpp
- Committer:
- kenjiArai
- Date:
- 2014-06-13
- Revision:
- 7:d3b49f1d9f76
- Parent:
- 4:81cea7a352b0
- Child:
- 8:f6aa5561f219
File content as of revision 7:d3b49f1d9f76:
/* * mbed Application program for the mbed LPC1114FN28 * Test program -> Check LED & Switch function * * Copyright (c) 2014 Kenji Arai / JH1PJL * http://www.page.sannet.ne.jp/kenjia/index.html * http://mbed.org/users/kenjiArai/ * Created: June 13th, 2014 * Revised: June 13th, 2014 * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "mbed.h" #define LED_TEST 0 // =1 -> LED test, =0 -> SW test DigitalOut myled0(dp28); // LED for Debug DigitalOut myled1(dp14); // Indicate state transition DigitalIn sw_chng(dp1,PullUp);// SW for select DigitalIn sw_mode(dp2,PullUp);// SW for Mode change int main() { #if LED_TEST while(1) { myled0 = 1; myled1 = 0; wait(1.0); myled0 = 0; myled1 = 1; wait(1.0); } #else while(1) { if (sw_chng == 1){ myled0 = 0; } else { myled0 = 1; } if (sw_mode == 1){ myled1 = 0; } else { myled1 = 1; } } #endif }