Arduino 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.

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.

Note

– 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.

void start(int,int)

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

 

SYNTAX
Vibration.start(duration,delay);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding the duration of vibration.
– 2nd Parameter takes an integer holding the delay after each repetitive duration (by default 65535 for stopping vibration).

 

USAGE
Vibration.start(1000,2000);

 

void start(byte,int[],int)

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 an integer holding pattern size.
– 2nd Parameter takes an integer holding the pattern.
– 3rd Parameter takes an integer holding the elay after each repetitive duration (by default 65535 for stopping vibration).

 

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*/

 

void start(void)

Stops the vibration even patterns.

 

SYNTAX
Vibration.stop();

 

RETURNS
None.

 

PARAMETERS
None.

 

USAGE
Vibration.stop();