2016-06-24 08:52:24 +02:00
|
|
|
# Shake
|
|
|
|
|
|
|
|
You can find when someone is shaking the BBC micro:bit by checking its
|
|
|
|
**accelerometer** (it finds whether the micro:bit is speeding up or
|
|
|
|
slowing down).
|
|
|
|
|
|
|
|
Unscramble these blocks in the editor to show a frownie when someone
|
|
|
|
shakes the micro:bit. (Ouch!)
|
|
|
|
|
|
|
|
```shuffle
|
|
|
|
input.onGesture(Gesture.Shake, () => {
|
|
|
|
basic.showLeds(`
|
|
|
|
. . . . .
|
|
|
|
. # . # .
|
|
|
|
. . . . .
|
|
|
|
. # # # .
|
|
|
|
# . . . #`);
|
|
|
|
});
|
|
|
|
```
|
2016-08-18 22:17:05 +02:00
|
|
|
Click **Download** to move your program to the BBC micro:bit!
|
2016-06-24 08:52:24 +02:00
|
|
|
|
2016-06-24 22:27:34 +02:00
|
|
|
### ~button /getting-started/coin-flipper
|
|
|
|
NEXT: COIN FLIPPER GAME
|
|
|
|
### ~
|