Update
This commit is contained in:
parent
d7fcfe1ff3
commit
81266028d5
12
main.ts
12
main.ts
@ -81,11 +81,13 @@ namespace grove {
|
|||||||
if (!paj7620) {
|
if (!paj7620) {
|
||||||
paj7620.init();
|
paj7620.init();
|
||||||
control.inBackground(() => {
|
control.inBackground(() => {
|
||||||
const gesture = paj7620.read();
|
while(true) {
|
||||||
basic.showNumber(data ++);
|
const gesture = paj7620.read();
|
||||||
if (gesture != lastGesture) {
|
if (gesture != lastGesture) {
|
||||||
lastGesture = gesture;
|
lastGesture = gesture;
|
||||||
control.raiseEvent(gestureEventId, lastGesture);
|
control.raiseEvent(gestureEventId, lastGesture);
|
||||||
|
}
|
||||||
|
basic.pause(50);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user