Lizzy project

Dependencies:   aconno_I2C Lis2dh12 adc52832_common aconno_SEGGER_RTT

Revision:
6:55607d577a42
Parent:
5:9903738f2587
Child:
7:ac8277568115
diff -r 9903738f2587 -r 55607d577a42 source/main.h
--- a/source/main.h	Fri Mar 09 18:09:57 2018 +0000
+++ b/source/main.h	Tue Mar 13 15:41:35 2018 +0000
@@ -13,10 +13,12 @@
 #include "aconno_ble.h"
 #include "ble/BLE.h"
 #include "GapAdvertisingData.h"
+#include "acd52832_bsp.h"
+#include "acn_nrf52_pwm.h"
 
 #define DEBUG               (0)
 #define PRINT_ON_RTT        (1)
-#define DEBUG_LED           (1)
+#define DEBUG_LED           (0)
 #define NANO_MODULE         (0)
 //#define LSB_VALUE           (192)
 #define LSB_VALUE           (1)
@@ -35,12 +37,17 @@
     #define INT_PIN2            (p15)
     #define ACC_POWER_PIN       (p11)
     #define RED_LED_PIN         (p22)
+    #define BUZZER_PIN          (p18)
 #endif
 
 #define BLE_ACTIVE_TIME_S   (0.4)
 #define POWER_UP_DELAY_MS   (200)
 #define MEASURE_INTERVAL_MS (100)
 
+
+#define BUZZER_FREQUENCY_HZ       (4000)
+#define BUZZ_TIME_S               (2)     /* Buzz time in s */
+
 #if PRINT_ON_RTT
     #include "SEGGER_RTT.h"
     #define printf(...)                      SEGGER_RTT_printf(0, __VA_ARGS__)
@@ -70,10 +77,17 @@
 
 DigitalOut AccVcc(ACC_POWER_PIN);
 DigitalOut redLed(RED_LED_PIN);
+#if NANO_MODULE == 0
+DigitalOut blueLed(PIN_LED_BLUE);
+DigitalOut greenLed(PIN_LED_GREEN);
+#endif
 InterruptIn INT1(INT_PIN1);
 //InterruptIn INT2(INT_PIN2);
 I2C i2c(I2C_DATA,I2C_CLK);
 Lis2dh12 mems(&i2c, memsI2CAddress);
 Ticker bleTicker;
+Ticker test_ticker;
+
+NRF52_PWM buzzer(NRF_PWM2);
 
 #endif