working proof-of-concept file read fom disk

This commit is contained in:
minjaesong
2020-10-28 23:07:12 +09:00
parent 664a4ca758
commit 29584b7070
8 changed files with 161 additions and 82 deletions

View File

@@ -1,4 +1,8 @@
var ba = com.sendMessageGetBytes(0, "DEVNAM"+String.fromCharCode(0x17));
function getStatusMessage(portNo) {
return com.sendMessageGetBytes(portNo, "DEVSTU"+String.fromCharCode(0x17));
}
let ba = com.sendMessageGetBytes(0, "DEVNAM"+String.fromCharCode(0x17));
serial.println(ba);
ba = com.pullMessage(0)
@@ -10,15 +14,23 @@ serial.println("# END OF MSG");
ba = com.sendMessageGetBytes(1, "DEVNAM"+String.fromCharCode(0x17));
serial.println(ba);
ba = com.sendMessageGetBytes(1, "DEVSTU"+String.fromCharCode(0x17));
serial.println(ba);
serial.println(getStatusMessage(1));
ba = com.sendMessageGetBytes(1, "LIST");
ba = com.pullMessage(1);
println(ba);
ba = com.sendMessageGetBytes(1, "DEVSTU"+String.fromCharCode(0x17));
serial.println(ba);
serial.println(getStatusMessage(1));
com.sendMessage(1, "OPENR\"basic.js\"");
println("Status code: "+com.getStatusCode(1));
com.sendMessage(1, "READ");
println("Status code: "+com.getStatusCode(1));
let source = com.pullMessage(1);
println(source);
eval(source);
serial.println("k bye")