daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let signal = 0
  2. radio.onReceivedNumber(function (receivedNumber) {
  3.     signal = radio.receivedPacket(RadioPacketProperty.SignalStrength)
  4.     basic.pause(200)
  5. })
  6. radio.setGroup(1)
  7. basic.forever(function () {
  8.     if (signal < -90) {
  9.         basic.showString("0")
  10.     } else if (signal < -80) {
  11.         basic.showNumber(1)
  12.     } else if (signal < -75) {
  13.         basic.showNumber(1)
  14.     } else if (signal < -70) {
  15.         basic.showNumber(3)
  16.     } else if (signal < -65) {
  17.         basic.showNumber(4)
  18.     } else if (signal < -60) {
  19.         basic.showNumber(5)
  20.     } else if (signal < -55) {
  21.         basic.showNumber(6)
  22.     } else if (signal < -50) {
  23.         basic.showNumber(7)
  24.     } else if (signal < -45) {
  25.         basic.showNumber(8)
  26.     } else {
  27.         basic.showNumber(9)
  28.     }
  29. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top