Updated blinky pattern

This commit is contained in:
microbuilder committed 2017-02-10 12:52:46 +01:00
1 parent 7cf9d485cb
commit ceeec80e33
1 file changed
+3 -2
@@ -18,6 +18,7 @@ BLEUart bleuart;
BLEBas blebas; BLEBas blebas;
#define STATUS_LED (17) #define STATUS_LED (17)
#define BLINKY_MS (2000)
int blinkyms; int blinkyms;
@@ -33,7 +34,7 @@ void setup()
// Setup the BLE LED to be enabled on CONNECT // Setup the BLE LED to be enabled on CONNECT
// Note: This is actually the default behaviour, but provided // Note: This is actually the default behaviour, but provided
// here in case you want to control this manually via PIN 19) // here in case you want to control this manually via PIN 19
Bluefruit.enableLedConn(true); Bluefruit.enableLedConn(true);
Bluefruit.begin(); Bluefruit.begin();
@@ -77,7 +78,7 @@ void setupAdv(void)
void loop() void loop()
{ {
// Blinky! // Blinky!
if (blinkyms+500 < millis()) { if (blinkyms+BLINKY_MS < millis()) {
blinkyms = millis(); blinkyms = millis();
digitalWrite(STATUS_LED, !digitalRead(STATUS_LED)); digitalWrite(STATUS_LED, !digitalRead(STATUS_LED));
} }