update for new microcontroller
This commit is contained in:
@@ -67,7 +67,7 @@ class XiaoConnectorCubit extends Cubit<XiaoConnectorState> {
|
||||
}
|
||||
|
||||
// set the xiao sense name
|
||||
if (r.device.advName == 'Go Bluetooth') {
|
||||
if (r.device.advName == 'Trouble Example') {
|
||||
await FlutterBluePlus.stopScan();
|
||||
device = r.device;
|
||||
|
||||
@@ -100,6 +100,27 @@ class XiaoConnectorCubit extends Cubit<XiaoConnectorState> {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> debug() async {
|
||||
print('DEBUG!');
|
||||
final accelService = _services
|
||||
.where(
|
||||
(s) => s.serviceUuid == Guid('19B10000-E8F2-537E-4F6C-D104768A1214'),
|
||||
)
|
||||
.first
|
||||
.characteristics
|
||||
.where(
|
||||
(c) =>
|
||||
c.characteristicUuid ==
|
||||
Guid('19B10000-E8F2-537E-4F6C-D104768A1217'),
|
||||
)
|
||||
.first;
|
||||
|
||||
final data = await accelService.read();
|
||||
print(data);
|
||||
|
||||
// accelService.onValueReceived((data) {});
|
||||
}
|
||||
|
||||
Future<void> setCapturingOn() async {
|
||||
final senseService = _services
|
||||
.where(
|
||||
|
||||
Reference in New Issue
Block a user