Skip to content

Commit d0cbc83

Browse files
authored
Merge pull request #3 from cparata/master
Replace some defines for compatibility with new version of the core
2 parents 78a7774 + 4f57044 commit d0cbc83

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

examples/BleSensors_SensiBLE/BleSensors_SensiBLE.ino

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@
2828
#include <HTS221Sensor.h>
2929
#include <LPS25HBSensor.h>
3030

31-
#define PIN_LED_GRN (13)
32-
#define PIN_SPI_MOSI (11)
33-
#define PIN_SPI_MISO (12)
34-
#define PIN_SPI_SCK (3)
31+
#define PIN_SENSIBLE_LED_GRN (13)
32+
#define PIN_BLE_SPI_MOSI (11)
33+
#define PIN_BLE_SPI_MISO (12)
34+
#define PIN_BLE_SPI_SCK (3)
3535

36-
#define PIN_SPI_nCS (A1)
37-
#define PIN_SPI_RESET (7)
38-
#define PIN_SPI_IRQ (A0)
36+
#define PIN_BLE_SPI_nCS (A1)
37+
#define PIN_BLE_SPI_RESET (7)
38+
#define PIN_BLE_SPI_IRQ (A0)
3939

4040
#define PIN_BLE_LED (0xFF)
4141

4242
#define SerialPort Serial
4343
#define DEV_I2C Wire
4444

4545
// Configure BTLE_SPI
46-
SPIClass BTLE_SPI(PIN_SPI_MOSI, PIN_SPI_MISO, PIN_SPI_SCK);
46+
SPIClass BTLE_SPI(PIN_BLE_SPI_MOSI, PIN_BLE_SPI_MISO, PIN_BLE_SPI_SCK);
4747

4848
// Configure BTLE pins
49-
SPBTLERFClass BTLE(&BTLE_SPI, PIN_SPI_nCS, PIN_SPI_IRQ, PIN_SPI_RESET, PIN_BLE_LED);
49+
SPBTLERFClass BTLE(&BTLE_SPI, PIN_BLE_SPI_nCS, PIN_BLE_SPI_IRQ, PIN_BLE_SPI_RESET, PIN_BLE_LED);
5050

5151
const char *name = "BlueNRG";
5252
uint8_t SERVER_BDADDR[] = {0x12, 0x34, 0x00, 0xE1, 0x80, 0x03};
@@ -72,7 +72,7 @@ uint32_t printSkipCnt = 0;
7272
void setup() {
7373
int ret;
7474

75-
pinMode(PIN_LED_GRN, OUTPUT);
75+
pinMode(PIN_SENSIBLE_LED_GRN, OUTPUT);
7676

7777
SerialPort.begin(115200);
7878

@@ -238,19 +238,19 @@ void Led_Blink()
238238
if(millis() - prevLedMsec > 1000)
239239
{
240240
prevLedMsec = millis();
241-
digitalWrite(PIN_LED_GRN, HIGH);
241+
digitalWrite(PIN_SENSIBLE_LED_GRN, HIGH);
242242
delay(10);
243-
digitalWrite(PIN_LED_GRN, LOW);
243+
digitalWrite(PIN_SENSIBLE_LED_GRN, LOW);
244244
}
245245
}
246246
else
247247
{
248248
if(millis() - prevLedMsec > 300)
249249
{
250250
prevLedMsec = millis();
251-
digitalWrite(PIN_LED_GRN, HIGH);
251+
digitalWrite(PIN_SENSIBLE_LED_GRN, HIGH);
252252
delay(10);
253-
digitalWrite(PIN_LED_GRN, LOW);
253+
digitalWrite(PIN_SENSIBLE_LED_GRN, LOW);
254254
}
255255
}
256256
}

0 commit comments

Comments
 (0)