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