Skip to content

Replace some defines for compatibility with new version of the core #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions examples/BleSensors_SensiBLE/BleSensors_SensiBLE.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@
#include <HTS221Sensor.h>
#include <LPS25HBSensor.h>

#define PIN_LED_GRN (13)
#define PIN_SPI_MOSI (11)
#define PIN_SPI_MISO (12)
#define PIN_SPI_SCK (3)
#define PIN_SENSIBLE_LED_GRN (13)
#define PIN_BLE_SPI_MOSI (11)
#define PIN_BLE_SPI_MISO (12)
#define PIN_BLE_SPI_SCK (3)

#define PIN_SPI_nCS (A1)
#define PIN_SPI_RESET (7)
#define PIN_SPI_IRQ (A0)
#define PIN_BLE_SPI_nCS (A1)
#define PIN_BLE_SPI_RESET (7)
#define PIN_BLE_SPI_IRQ (A0)

#define PIN_BLE_LED (0xFF)

#define SerialPort Serial
#define DEV_I2C Wire

// Configure BTLE_SPI
SPIClass BTLE_SPI(PIN_SPI_MOSI, PIN_SPI_MISO, PIN_SPI_SCK);
SPIClass BTLE_SPI(PIN_BLE_SPI_MOSI, PIN_BLE_SPI_MISO, PIN_BLE_SPI_SCK);

// Configure BTLE pins
SPBTLERFClass BTLE(&BTLE_SPI, PIN_SPI_nCS, PIN_SPI_IRQ, PIN_SPI_RESET, PIN_BLE_LED);
SPBTLERFClass BTLE(&BTLE_SPI, PIN_BLE_SPI_nCS, PIN_BLE_SPI_IRQ, PIN_BLE_SPI_RESET, PIN_BLE_LED);

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

pinMode(PIN_LED_GRN, OUTPUT);
pinMode(PIN_SENSIBLE_LED_GRN, OUTPUT);

SerialPort.begin(115200);

Expand Down Expand Up @@ -238,19 +238,19 @@ void Led_Blink()
if(millis() - prevLedMsec > 1000)
{
prevLedMsec = millis();
digitalWrite(PIN_LED_GRN, HIGH);
digitalWrite(PIN_SENSIBLE_LED_GRN, HIGH);
delay(10);
digitalWrite(PIN_LED_GRN, LOW);
digitalWrite(PIN_SENSIBLE_LED_GRN, LOW);
}
}
else
{
if(millis() - prevLedMsec > 300)
{
prevLedMsec = millis();
digitalWrite(PIN_LED_GRN, HIGH);
digitalWrite(PIN_SENSIBLE_LED_GRN, HIGH);
delay(10);
digitalWrite(PIN_LED_GRN, LOW);
digitalWrite(PIN_SENSIBLE_LED_GRN, LOW);
}
}
}