MetaWear C++ API  0.20.0
C++ implementation of the MetaWear protocol
Functions
haptic.h File Reference

Communicates with the haptic driver. More...

#include "peripheral_common.h"

Go to the source code of this file.

Functions

METAWEAR_API void mbl_mw_haptic_start_motor (const MblMwMetaWearBoard *board, float duty_cycle_per, uint16_t pulse_width_ms)
 Drives a motor - Pulls down the HCD pin The MetaWear has a driver for motor or buzzers that are 3C compatible (check the datasheet) This is not a full PWM driver. More...
 
METAWEAR_API void mbl_mw_haptic_start_buzzer (const MblMwMetaWearBoard *board, uint16_t pulse_width_ms)
 Drives a buzzer - Pulls down the HCD pin The MetaWear has a driver for motor or buzzers that are 3C compatible (check the datasheet) More...
 

Detailed Description

Communicates with the haptic driver.

Function Documentation

◆ mbl_mw_haptic_start_buzzer()

METAWEAR_API void mbl_mw_haptic_start_buzzer ( const MblMwMetaWearBoard board,
uint16_t  pulse_width_ms 
)

Drives a buzzer - Pulls down the HCD pin The MetaWear has a driver for motor or buzzers that are 3C compatible (check the datasheet)

Parameters
boardPointer to the board to send the command to
pulse_width_msHow long to run the buzzer, in milliseconds

◆ mbl_mw_haptic_start_motor()

METAWEAR_API void mbl_mw_haptic_start_motor ( const MblMwMetaWearBoard board,
float  duty_cycle_per,
uint16_t  pulse_width_ms 
)

Drives a motor - Pulls down the HCD pin The MetaWear has a driver for motor or buzzers that are 3C compatible (check the datasheet) This is not a full PWM driver.

Parameters
boardPointer to the board to send the command to
duty_cycle_perStrength of the motor, between [0, 100] percent
pulse_width_msHow long to run the motor, in milliseconds