[social size='small' style='light' type='twitter,facebook,dribbble']

Warning: Invalid argument supplied for foreach() in H:\root\home\lauracortes-002\www\at\wp-content\themes\dante\swift-framework\sf-content-display\sf-page-heading.php on line 59

unfastenButton()

[blank_spacer height=»30px» width=»1/1″ el_position=»first last»] [spb_text_block pb_margin_bottom=»no» pb_border_bottom=»no» width=»1/1″ el_position=»first last»]

Description

Allows the validation and recognition of the gesture of unfastening a button.

[/spb_text_block] [spb_text_block pb_margin_bottom=»no» pb_border_bottom=»no» width=»1/1″ el_position=»first last»]

Syntax

[/spb_text_block] [codesnippet pb_margin_bottom=»yes» width=»1/2″ el_position=»first last»]

unfastenButton()

[/codesnippet] [spb_text_block pb_margin_bottom=»no» pb_border_bottom=»no» width=»1/1″ el_position=»first last»]

Parameters

None.

[/spb_text_block] [spb_text_block pb_margin_bottom=»no» pb_border_bottom=»no» width=»1/1″ el_position=»first last»]

Returns

[/spb_text_block] [codesnippet pb_margin_bottom=»yes» width=»1/2″ el_position=»first last»]

true //if recognizes the gesture of unfastening the button.

[/codesnippet] [spb_text_block pb_margin_bottom=»no» pb_border_bottom=»no» width=»1/1″ el_position=»first last»]

Example code

Simple blink.

[/spb_text_block] [codesnippet pb_margin_bottom=»yes» width=»1/1″ el_position=»first last»]

#include <Soft2Soft.h>

Button button(2)
int ledPin=3;

void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}

void loop() {
if(button.fastenButton())digitalWrite(ledPin,HIGH);//turns on the led if the button is fastened
delay(500);
fi(button.unfastenButton()digitalWrite(ledPin,LOW);//turns off the led if the button is unfastened
delay(500);
}

[/codesnippet] [spb_text_block pb_margin_bottom=»no» pb_border_bottom=»no» width=»1/1″ el_position=»first last»]

Crafting Examples

Button gestures
Textile gestures sampler
Jacket

 

[/spb_text_block] [blank_spacer height=»30px» width=»1/3″ el_position=»first»] [spb_text_block pb_margin_bottom=»no» pb_border_bottom=»no» width=»1/3″]

[sf_button colour=»grey» type=»stroke-to-fill» size=»standard» link=»http://lauracortes-002-site8.btempurl.com/soft2soft-biblioteca-gestos-textiles/» target=»_self» icon=»ss-doc» dropshadow=»no» extraclass=»»]Back to Reference[/sf_button]

[/spb_text_block] [blank_spacer height=»30px» width=»1/3″ el_position=»last»]