NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
char MSPFComboPWM ( const byte  port,
const byte  i2caddr,
const byte  channel,
const byte  outa,
const byte  outb 
)
inline

MSPFComboPWM function.

Control the speed of both outputs on a Power Function receiver set to the specified channel using the mindsensors NRLink device. Valid output values are PF_PWM_FLOAT, PF_PWM_FWD1, PF_PWM_FWD2, PF_PWM_FWD3, PF_PWM_FWD4, PF_PWM_FWD5, PF_PWM_FWD6, PF_PWM_FWD7, PF_PWM_BRAKE, PF_PWM_REV7, PF_PWM_REV6, PF_PWM_REV5, PF_PWM_REV4, PF_PWM_REV3, PF_PWM_REV2, and PF_PWM_REV1. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. The port must be configured as a Lowspeed port before using this function.

Parameters
portThe sensor port. See Input port constants.
i2caddrThe sensor I2C address. See sensor documentation for this value.
channelThe Power Function channel. See Power Function channel constants.
outaThe Power Function PWM command for output A. See Power Function PWM option constants.
outbThe Power Function PWM command for output B. See Power Function PWM option constants.
Returns
The function call result. NO_ERR or Communications specific errors.
Examples:
ex_MSPFComboPWM.nxc.