Extract the device name into a constant at the top of the file to make it easier to change

This commit is contained in:
Timur Iskhodzhanov 2021-01-30 14:16:17 -08:00
parent af4f19b387
commit 178ec52640
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
#include <CAN.h>
#include <RaceChrono.h>
#define DEVICE_NAME "BLE CAN device demo"
// Connections:
// MCP | BOARD
// INT | Not used, can connect to Pin 9
@ -185,7 +187,7 @@ void setup() {
}
Serial.println("Setting up BLE...");
RaceChronoBle.setUp("BLE CAN device demo", &raceChronoHandler);
RaceChronoBle.setUp(DEVICE_NAME, &raceChronoHandler);
RaceChronoBle.startAdvertising();
Serial.println("BLE is set up, waiting for an incoming connection.");