daily pastebin goal
40%
SHARE
TWEET

CC: exercise10_1_send

hevohevo May 21st, 2016 (edited) 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- exercise10_1_send
  2. -- ワイヤレス通信メッセージを送信する(送信プログラム)
  3.  
  4. local args = {...}
  5.  
  6. local msg_str = "Hello"  -- デフォルトのメッセージ文字列
  7. if args[1] then
  8.   msg_str = args[1]  -- もしパラメータが指定してあったら、その文字列を送信
  9. end
  10.  
  11. rednet.open("right")  -- 右側に装着したモデムを使う宣言
  12. rednet.broadcast(msg_str)  -- すべてのパソコンにメッセージを一斉配信
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