Skip to content

Latest commit

 

History

History
executable file
·
37 lines (31 loc) · 955 Bytes

Examples.md

File metadata and controls

executable file
·
37 lines (31 loc) · 955 Bytes

Examples + Common Used Features

Use the Run Command and Capture the output

Normally, the run command will surround the lua script output with some status data. This feature might be disruptive when you need the output in a third party script - of course you could use a Regular-Expression to match the boundaries, but there is a better option: It is recommended to use the --silent flag to reject status messages - only the script output is returned by NodeMCU-Tool. But keep in mind to check the return_code!

Example

$ nodemcu-tool run helloworld.lua --silent
Hello World!
|---|
| H |
| E |
| L |
| L |
| O |
| | |
| W |
| O |
| R |
| L |
| D |
|---|
YEAH!!! HELLO WORLD!!!
String: Lorem ipsum dolor sit amet, consetetur sadipscing elitr

Capture the Output

$ nodemcu-tool run helloworld.lua --silent > helloworld_output.txt