Vibration Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld

 

 

Turn your smartphone into a vibration shield for Arduino. Vibration library allows your phone to vibrate even in certain duration or using different patterns.
Learn more from the examples page. 

This shield is one of the special shields. Special shields allows your Arduino board to use some capabilities your smartphone can do, like playing music, taking a picture, getting notifications, accessing the clock data and using the touch screen for various functions. Learn more from the special shields tutorial.

Vibration library allows your phone to vibrate even in certain duration or using different patterns.

Adding #define CUSTOM_SETTINGS along with #define INCLUDE_VIBRATION_SHIELD is a key that will let you unlock Vibration shield only amongst all shields and prevent 1Sheeld library from eating your memory especially for UNO board.

Notes :

– The pattern must be int[].
Max pattern length is 127 elements,Each element in the array range between 0 and 65534.
Delay time used must be int and range between 0 and 65534.
– Any call to Vibration.start() cancels the prior calls of it -which means any repetitive vibration will stop.

Vibrate a given duration..

SYNTAX

Vibration.start (duration);

RETURNS

None.

PARAMETERS

1st parameter takes the duration of vibration.

USAGE

Vibration.start(1000); /* will vibrate for a second then stops*/

 

Always vibrate with given duration and a delay after each repetitive duration.

SYNTAX

Vibration.start (duration,delay);

RETURNS

None.

PARAMETERS

1st parameter takes the duration of vibration.

2nd parameter takes the delay after each repetitive duration (default for stopping vibration= 65535).

USAGE

Vibration.start(1000,2000); /* always vibrate for a second and stop for two seconds and so on...*/

Vibrate a certain pattern once.

Note: patterns start with silent state for first element then vibrates then silent and so on…

SYNTAX

Vibration.start (patternSize,pattern);

RETURNS

None.

PARAMETERS

1st parameter takes pattern size.

2nd parameter takes the pattern.

USAGE

int pattern [3] = {1000,2000,1000};
Vibration.start(3,pattern);    /* phone will vibrate in a pattern silent for 1second then vibrate for 2seconds then silent                                  for 1second*/

Repeating vibrating patterns with certain delay after each whole pattern. 

Note: patterns start with silent state for first element then vibrates then silent and so on…

SYNTAX

Vibration.start (patternSize,pattern,delay);

RETURNS

None.

PARAMETERS

1st parameter takes pattern size.

2nd parameter takes the pattern.

3rd parameter takes the delay after repetitive pattern (default for stopping vibration pattern= 65535).

USAGE

int pattern [3] = {1000,2000,1000};
Vibration.start(3,pattern,2000); /* start pattern as stated in last USAGE and when finished with pattern it repeats*/

Stops the vibration even patterns.

Note : there’s a software stop button in the application that also stops the vibrating once pressed. 

SYNTAX

Vibration.stop( );

RETURNS

None.

PARAMETERS

None.

USAGE

Vibration.stop();