Code: Select all
$ wc --lines mp.js
27 mp.js
$
$ ./mp.js
mp.js pwd host cmd [...]
$
Code: Select all
$ node mp.js abcd 192.168.4.1 5**4**3
542101086242752217003726400434970855712890625
$
$ ./mp.js abcd 192.168.4.1 'print("ab\ncd")'
ab
cd
$
Code: Select all
$ ./mp.js abcd 192.168.4.1 import utime
$ ./mp.js abcd 192.168.4.1 utime.localtime"()"
(2000, 1, 1, 6, 13, 30, 5, 1)
$ ./mp.js abcd 192.168.4.1 import ntptime
$ ./mp.js abcd 192.168.4.1 ntptime.settime"()"
$ ./mp.js abcd 192.168.4.1 utime.localtime"()"
(2018, 11, 29, 22, 9, 2, 3, 333)
$
Code: Select all
$ ./mp.js abcd 192.168.4.1 'pipe("boot.py") | (head, 14) | (tail,4) | done'
#import network
#sta_if = network.WLAN(network.STA_IF)
#sta_if.active(True)
#sta_if.connect("MicroPython-5cd6ae", "12345678")
$