Post
by wr300000 » Thu Mar 05, 2020 6:39 am
Normally I use screen to enter REPL. I recently use rshell as IDE
rshell -p /dev/ttyUSB0 --editor nano --buffer-size=30
/home/wr300000> repl <---- get in repl and release machine.reset() to rerun my main.py
Below is result from my main.py showing normal /sd directory and other configured variables.
GC:
37952 total
12256 : 25696
1=84 2=8 m=264
free RAM = 9312 bytes
I2C(PCF8574) LCD not found
free SDcard = 7926009856 bytes
total SDcard = 7931396096 bytes
stack: 2768 out of 8192
GC: total: 37952, used: 12880, free: 25072
No. of 1-blocks: 99, 2-blocks: 8, max blk sz: 264, max free sz: 1457
Thr 5 MAR 2020 - 12:39 UTC+ 7
MicroPython v1.12-195-gb16990425-dirty on 2020-03-03; ESP module with ESP8266
Type "help()" for more information.
>>> dir()
['winteroff', 'uos', 'sdcheck', 'nettime', 'ppwmstop', 'mem_info', 'clear', 'os', 'sd', 'gc', 'dayl', 'pwordd', 'plow', 'pscl', 'sid', 'esp', 'cat', 'cp', 'platform', 'sdcard', 'pword', 'sleep_ms', 'dlboot', 'machine', 'Pin', 'ssidd', 'sync_ntp', 'i2cPinSCL', 'summeroff', 'I2C', 'now', 'soff', 'webrepl', 'ticks_ms', 'phigh', 'i2cPinSDA', 'bdev', '__name__', 'ppwm', 'delayboot', 'psda', 'daylight', 'woff'] <---- /sd and configured variable are present
>>> os.listdir()
['sd', 'boot.py', 'main.py', 'webrepl_cfg.py', 'confighw.py', 'conf.py', 'board.py'] <---- before ctrl-X
>>> <---- ctrl-X to shell
/home/wr300000> ls /pyboard <---- release rshell list command
board.py conf.py main.py
boot.py confighw.py webrepl_cfg.py <---- /sd and all configured variable gone
/home/wr300000> repl
Entering REPL. Use Control-X to exit.
MicroPython v1.12-195-gb16990425-dirty on 2020-03-03; ESP module with ESP8266
Type "help()" for more information.
>>>
>>> dir() <---- /sd and all configured variable gone
['bdev', 'get_stat', '__name__', 'stat', 'uos', 'esp', 'webrepl', 'gc', 'output']
>>>
Why did rshell Iist command effect to main.py ?