cc young
cc young

Reputation: 20213

With NodeMCU, how to read from console?

Writing some lua libraries for NodeMCU. Would like to write test cases, but need to read / write to "console", ie, the terminal connection, in order to perform the tests.

The way ESPlorer is structured it might not be possible. Using minicom would be OK since only needed to run test suite.

For example:

= Hook LED to D1
= Hit Enter when done
>
= Did the LED come on? (y/n)
>
...

Anyone done anything like this?

Upvotes: 0

Views: 803

Answers (1)

wnasich
wnasich

Reputation: 418

You could use node.input() and node.output() for that purpose.

Upvotes: 1

Related Questions