added block to convert gesture in number
This commit is contained in:
parent
8d81b2a132
commit
65171081a9
8
main.ts
8
main.ts
@ -574,6 +574,14 @@ namespace grove {
|
|||||||
return joystick.joyread(xpin, ypin);
|
return joystick.joyread(xpin, ypin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts the gesture name to a number
|
||||||
|
* Useful for comparisons
|
||||||
|
*/
|
||||||
|
//% blockId=ggesture block="%key"
|
||||||
|
export function ggesture(g: GroveGesture): number {
|
||||||
|
return g;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do something when a gesture is detected by Grove - Gesture
|
* Do something when a gesture is detected by Grove - Gesture
|
||||||
|
Loading…
Reference in New Issue
Block a user