MELDINGER MED MORSEKODE input.onButtonPressed(Button.A, function () { basic.showLeds(` . . . . . . # # # . . # # # . . # # # . . . . . . `) radio.sendNumber(0) basic.pause(100) basic.showLeds(` . . . . . . . . . . . . . . . . . . . . . . . . . `) }) input.onButtonPressed(Button.B, function () { basic.showLeds(` . . . . . . . . . . . # # # . . . . . . . . . . . `) radio.sendNumber(1) basic.pause(100) basic.showLeds(` . . . . . . . . . . . . . . . . . . . . . . . . . `) }) input.onGesture(Gesture.Shake, function () { basic.showLeds(` . . # . . . . . # . # # # # # . . . # . . . # . . `) radio.sendNumber(2) basic.pause(100) basic.showLeds(` . . . . . . . . . . . . . . . . . . . . . . . . . `) }) input.onGesture(Gesture.ScreenDown, function () { basic.showLeds(` # . . . # . # . # . . . # . . . # . # . # . . . # `) radio.sendNumber(3) basic.pause(100) basic.showLeds(` . . . . . . . . . . . . . . . . . . . . . . . . . `) }) radio.onReceivedNumber(function (receivedNumber) { if (receivedNumber == 0) { basic.showLeds(` . . . . . . # # # . . # # # . . # # # . . . . . . `) } else if (receivedNumber == 1) { basic.showLeds(` . . . . . . . . . . . # # # . . . . . . . . . . . `) } else if (receivedNumber == 2) { basic.showLeds(` . . # . . . . . # . # # # # # . . . # . . . # . . `) } else { basic.showLeds(` # . . . # . # . # . . . # . . . # . # . # . . . # `) } basic.pause(100) basic.showLeds(` . . . . . . . . . . . . . . . . . . . . . . . . . `) }) radio.setTransmitPower(7) radio.setGroup(1)