pulseRumble()
Purpose
Pulse the controller rumble motors
Description
Pulse one of the 4 controller motors at the specified frequency, speed and volume
Syntax
pulseRumble( controller, channel, speed, volume, frequency )
Arguments
controller identifier for the controller (0 is the first)
channel identifier for the motor (0 - top left, 1 - bottom left, 2 - top right, 3 -bottom right)
speed The speed of the pulse - this affects the duration
volume volume (amplitude) of vibration (0 - 1)
frequency frequency of vibration
Example
volume = 1
speed = 1
loop
clear()
printAt( 0, 0, "Press X to pulse motor 0" )
printAt( 0, 1, "Press Y to pulse motor 1" )
printAt( 0, 2, "Press A to pulse motor 2" )
printAt( 0, 3, "Press B to pulse motor 3" )
c = controls( 0 )
motor = -1
if c.x then
motor = 0
endIf
if c.y then
motor = 1
endIf
if c.a then
motor = 2
endIf
if c.b then
motor = 3
endIf
if motor > -1 then
pulseRumble( 0, motor, volume, speed, motor * 100 + 100 )
sleep( 0.2 )
endIf
update()
repeat
Associated Commands