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.
Dependencies: Adafruit_GFX_128x64 DS3231 PinDetect SDFileSystem USBDevice mbed RealtimeMath MODSERIAL
Diff: main.cpp
- Revision:
- 20:294eaeaf2ebb
- Parent:
- 19:4f4f7bc4a3fb
- Child:
- 22:9350752f5414
--- a/main.cpp Thu Jun 05 19:23:53 2014 +0000
+++ b/main.cpp Thu Jun 05 20:06:41 2014 +0000
@@ -11,7 +11,7 @@
#include "SystemTime.h"
#include "sync.h"
#include "pins.h"
-#include "DS3231.h"
+//#include "DS3231.h"
// Capture button stuff
#define PIN_DETECT_SAMPLE_PERIOD_uS 20000 // 20 ms sample period
@@ -23,7 +23,7 @@
Adafruit_SSD1306 oled(spi0, P0_11, P0_12, P0_13); // DC, RST, CS
#endif
-DS3231 rtc(I2C_SDA, I2C_SCL);
+// DS3231 rtc(I2C_SDA, I2C_SCL);
// Mode button
PinDetect captureButton(P0_16, PullUp);
@@ -80,7 +80,7 @@
} else if (State == CAPTURE) {
OLED_PRINTP("Starting capture...", 0, 0);
OLED_PRINTP("Init SD card...", 0, 10);
- log_init(rtc.getTimestamp());
+ log_init();
OLED_PRINTP("Init peak detect...", 0, 10);
process_init();
OLED_PRINTP("Init data receipt...", 0, 10);
@@ -103,7 +103,7 @@
OLED_PRINTPF("%1d", min, 0, 40);
OLED_PRINTPF("%02d", sec, 5, 40);
- oled.drawPixel(14, 44, 0x1);
+ OLED_DRAWPIXEL(14, 44, 0x1);
OLED_PRINTPF("%02d", hund, 15, 40);
log_data(split);
}