String = "AT+NWM=0" sendln String ;msg Enterを実施 pause 3 String = "AT+P2P=921000000:12:0:0:8:13" sendln String ;msg Enterを実施 pause 1 String = "AT+P2P=?" sendln String ;msg Enterを実施 pause 1 String = "AT+PRECV=65533" sendln String ;msg Enterを実施 pause 1 i=1 n=1 while n msg='AT+PSEND=' gettime timestr "%H:%M:%S" strlen timestr len=result hexString = "" ; 16進数表現の文字列を格納する変数 for i 1 len strcopy timestr i 1 substr str2code val substr sprintf2 str2 "%2X" val strconcat hexString str2 next strconcat msg hexString sendln msg ;msg Enterを実施 pause 6 endwhile ;whileに戻る