Skip to main content

carp_movisens_package 2.2.0 copy "carp_movisens_package: ^2.2.0" to clipboard
carp_movisens_package: ^2.2.0 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

// ignore_for_file: depend_on_referenced_packages

import 'package:carp_core/carp_core.dart' hide Smartphone;
import 'package:carp_mobile_sensing/carp_mobile_sensing.dart';
import 'package:carp_movisens_package/carp_movisens_package.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
  var protocol = StudyProtocol(ownerId: 'owner@dtu.dk', name: 'Movisens Example');

  // Define which devices are used for data collection - both phone and Movisens
  // and add them to the protocol.
  // Note that the Movisens device is added as a connected device to the phone.
  var phone = Smartphone();
  var movisens = MovisensDevice(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
140
points
231
downloads

Documentation

Documentation
API reference

Publisher

verified publishercarp.dk

Weekly Downloads

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

Topics

#mobile-sensing #mobile-health #sensors #digital-phenotyping

License

MIT (license)

Dependencies

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

More

Packages that depend on carp_movisens_package