Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let Times = 0
- input.onButtonPressed(Button.A, () => {
- radio.sendNumber(5)
- })
- input.onGesture(Gesture.LogoUp, () => {
- radio.sendNumber(1)
- })
- input.onGesture(Gesture.ScreenUp, () => {
- radio.sendNumber(5)
- })
- input.onGesture(Gesture.LogoDown, () => {
- radio.sendNumber(4)
- })
- input.onGesture(Gesture.TiltLeft, () => {
- radio.sendNumber(2)
- })
- input.onGesture(Gesture.TiltRight, () => {
- radio.sendNumber(3)
- })
- Times = input.runningTime() + 1000
- radio.setGroup(56)
- radio.setTransmitPower(7)
- basic.forever(() => {
- if (input.runningTime() > Times) {
- Times = input.runningTime() + 1000
- led.toggle(0, 0)
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment