This commit is contained in:
Juri
2020-08-19 22:03:58 +02:00
parent 4ef7b9318f
commit 3152215415
291 changed files with 9511 additions and 2966 deletions

View File

@@ -17,7 +17,7 @@ This example send the frequency and duration over radio
and plays it on the remote @boardname@.
```typescript
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
input.onButtonPressed(Button.A, () => {
music.playTone(440, 120)
led.toggle(0, 0)
})
@@ -26,7 +26,7 @@ radio.onReceivedNumber(function (receivedNumber) {
const duration = receivedNumber & 0xffff;
music.playTone(freq, duration);
})
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
input.onButtonPressed(Button.B, () => {
music.setPlayTone((frequency: number, duration: number) => {
radio.sendNumber((frequency << 16) | (duration & 0xffff));
})