Skip to content

Commit 357960a

Browse files
committed
ble timing
1 parent 37c1089 commit 357960a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

examples/ScienceJournal/ScienceJournal.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,18 @@ void loop() {
126126
updateSubscribedCharacteristics();
127127
}
128128
*/
129+
//BLE.poll(1000);
129130
BLEDevice central = BLE.central();
130131
if (central) {
131132
_is_connected = true;
132133
// airSensor.setValue(dummyAirSensorData, sizeof(dummyAirSensorData));
134+
lastNotify=millis();
133135
while (central.connected()) {
136+
if (millis()-lastNotify>10){
137+
updateSubscribedCharacteristics();
138+
lastNotify=millis();
139+
}
134140

135-
updateSubscribedCharacteristics();
136141
}
137142
} else {
138143
delay(100);

src/Arduino_ScienceKitCarrier.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class ScienceKitCarrier{
7373
ScienceKitCarrier();
7474

7575
int begin();
76-
void update(const bool roundrobin=ROUND_ROBIN_DISABLE); // this makes update on: analog in, imu, apds, ina, resistance, round robin enables one sensor update
76+
void update(const bool roundrobin=false); // this makes update on: analog in, imu, apds, ina, resistance, round robin enables one sensor update
7777
void startAuxiliaryThreads();
7878

7979

0 commit comments

Comments
 (0)