Issue with Vibrator Plugin Pattern

Having a problem getting the Vibrator Plugin to work using the pattern option.

My code works fine using, vibrator.vibrate(duration). But I get nothing when using the pattern vibrator.vibrate(pattern, [repeat]).

Suggestions? Thanks

local function alert() if segment1=="1" then vibrator.vibrate(100) elseif segment1=="2" then vibrator.vibrate(300) elseif segment1=="3" then vibrator.vibrate(500) elseif segment1=="4" then vibrator.vibrate(700) elseif segment1=="5" then vibrator.vibrate({500,500}) elseif segment1=="6" then vibrator.vibrate({500,500,500}) end end

Solved.

According to the documentation:

The first value indicates the number of milliseconds to wait before turning the vibrator on. The next value indicates the number of milliseconds for which to keep the vibrator on before turning it off.

Wrote as:

vibrator.vibrate({100, 1000, 100, 200})

This returns 2 vibrations. 1 for 1000ms and 1 for 200ms