carp_movisens_package 1.4.1 copy "carp_movisens_package: ^1.4.1" to clipboard
carp_movisens_package: ^1.4.1 copied to clipboard

CARP Movisens sampling package. Samples movement, activity, HRV, MET-level, and ECG for the Movisens Move4 and EcgMove4 devices

example/lib/example.dart

import 'package:carp_core/carp_core.dart';
import 'package:carp_mobile_sensing/carp_mobile_sensing.dart';
import 'package:carp_movisens_package/carp_movisens_package.dart';
// import 'package:movisens_flutter/movisens_flutter.dart';

/// This is a very simple example of how this sampling package is used with
/// CARP Mobile Sensing (CAMS).
/// NOTE, however, that the code below will not run.
/// See the documentation on how to use CAMS: https://github.com/cph-cachet/carp.sensing-flutter/wiki
void main() async {
  // register this sampling package before using its measures
  SamplingPackageRegistry().register(MovisensSamplingPackage());

  // Create a study protocol
  StudyProtocol protocol = StudyProtocol(
    ownerId: 'owner@dtu.dk',
    name: 'Movisens Example',
  );

  // define which devices are used for data collection - both phone and Movisens
  Smartphone phone = Smartphone();
  MovisensDevice movisens = MovisensDevice(
    deviceName: 'MOVISENS Sensor 02655',
    sensorLocation: SensorLocation.Chest,
    sex: Sex.Male,
    height: 175,
    weight: 75,
    age: 25,
  );

  protocol
    ..addPrimaryDevice(phone)
    ..addConnectedDevice(movisens, phone);

  // adding a movisens measure
  protocol.addTaskControl(
      ImmediateTrigger(),
      BackgroundTask(name: 'Movisens Task', measures: [
        Measure(type: MovisensSamplingPackage.ACTIVITY),
      ]),
      movisens);
}
0
likes
0
pub points
28%
popularity

Publisher

verified publishercachet.dk

CARP Movisens sampling package. Samples movement, activity, HRV, MET-level, and ECG for the Movisens Move4 and EcgMove4 devices

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

async, carp_core, carp_mobile_sensing, carp_serializable, convert, flutter, flutter_blue_plus, json_annotation, movisens_flutter, openmhealth_schemas, permission_handler

More

Packages that depend on carp_movisens_package