@@ -92,12 +92,12 @@ void loop() {
92
92
// if a central is connected to peripheral:
93
93
if (central)
94
94
{
95
- Serial1 .print (" Connected to central: " );
95
+ Serial .print (" Connected to central: " );
96
96
// print the central's MAC address:
97
- Serial1 .println (central.address ());
97
+ Serial .println (central.address ());
98
98
99
- Serial1 .print (" IMU buffer size: " );
100
- Serial1 .println (sizeof (imuBuf));
99
+ Serial .print (" IMU buffer size: " );
100
+ Serial .println (sizeof (imuBuf));
101
101
102
102
// turn on the LED to indicate the connection:
103
103
digitalWrite (13 , HIGH);
@@ -108,8 +108,8 @@ void loop() {
108
108
currentMillis = sentTime = millis ();
109
109
while (central.connected ())
110
110
{
111
- // Take IMU data every 20 msec
112
- if ((millis () - sentTime) >= 40 )
111
+ // Take IMU data every 100 msec
112
+ if ((millis () - sentTime) >= 100 )
113
113
{
114
114
recordImuData (0 );
115
115
sentTime = millis ();
@@ -119,8 +119,8 @@ void loop() {
119
119
120
120
// when the central disconnects, turn off the LED:
121
121
digitalWrite (13 , LOW);
122
- Serial1 .print (" Disconnected from central: " );
123
- Serial1 .println (central.address ());
122
+ Serial .print (" Disconnected from central: " );
123
+ Serial .println (central.address ());
124
124
}
125
125
}
126
126
0 commit comments