File tree Expand file tree Collapse file tree 2 files changed +4
-48
lines changed
Expand file tree Collapse file tree 2 files changed +4
-48
lines changed Original file line number Diff line number Diff line change @@ -75,62 +75,18 @@ void loop_data() {
7575
7676void update (void ){
7777 while (1 ){
78- /*
7978 digitalWrite (8 ,HIGH);
80- science_kit.updateAPDS();
81- digitalWrite(8,LOW);
82- rtos::ThisThread::sleep_for(20);
83- digitalWrite(8,HIGH);
84- science_kit.updateAnalogInput();
85- digitalWrite(8,LOW);
86- rtos::ThisThread::sleep_for(20);
87- digitalWrite(8,HIGH);
88- science_kit.updateINA();
89- digitalWrite(8,LOW);
90- rtos::ThisThread::sleep_for(20);
91- digitalWrite(8,HIGH);
92- science_kit.updateIMU();
93- digitalWrite(8,LOW);
94- rtos::ThisThread::sleep_for(20);
95- digitalWrite(8,HIGH);
96- science_kit.updateResistance();
97- digitalWrite(8,LOW);
98- rtos::ThisThread::sleep_for(20);
99- */
100- digitalWrite (8 ,HIGH);
101- science_kit.update (ROUND_ROBIN_ENABLE);
79+ science_kit.update (ROUND_ROBIN_ENABLED);
10280 digitalWrite (8 ,LOW);
10381 rtos::ThisThread::sleep_for (20 );
10482 }
10583}
10684
10785void loop () {
108- /*
109- BLE.poll(1000);
110- while (BLE.connected()) {
111- digitalWrite(8,HIGH);
112- science_kit.update();
113- digitalWrite(8,LOW);
114- updateSubscribedCharacteristics();
115- delay(5);
116- }
117- */
118- /*
119- digitalWrite(8,HIGH);
120- science_kit.update();
121- digitalWrite(8,LOW);
122- */
123- /*
124- BLEDevice central = BLE.central();
125- if (central.connected()){
126- updateSubscribedCharacteristics();
127- }
128- */
129- // BLE.poll(1000);
86+
13087 BLEDevice central = BLE.central ();
13188 if (central) {
13289 _is_connected = true ;
133- // airSensor.setValue(dummyAirSensorData, sizeof(dummyAirSensorData));
13490 lastNotify=millis ();
13591 while (central.connected ()) {
13692 if (millis ()-lastNotify>10 ){
Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ const uint16_t MAXIMUM_AMPS{1}; // 1A
6161#define ACTIVITY_LED_PAIRING 2
6262
6363// Update
64- #define ROUND_ROBIN_ENABLE 1
65- #define ROUND_ROBIN_DISABLE 0
64+ #define ROUND_ROBIN_ENABLED 1
65+ #define ROUND_ROBIN_DISABLED 0
6666
6767
6868
You can’t perform that action at this time.
0 commit comments