Go Down

Topic: Is it possible to run a .lua file, or a .jar file? (Read 2 times) previous topic - next topic

WizenedEE

An arduino can not automagically do anything on your computer except fill up its serial buffer. Something has to be written to read that serial buffer and do something with the contents. Lua can read the serial port, so one script is all you technically need.

nate890

Also, "When it gets something", when it gets what? There is no way, with Arduino (that I know of so far) that would allow me to send something that would be detectable. For instance, if Arduino was able to create a file, I could loop until a file is detected then execute code. But then again, Arduino can't do this.

What should be done on the Arduino team's part is to create a function that can interact with your computer (as simple as os.execute(), or system() (in C), instead of inefficiently having to do it through other programming languages.

nate890

"Lua can read the serial port, so one script is all you technically need."
Do you know how this would be done? No need for code, just an explanation. Thanks.

WizenedEE


What should be done on the Arduino team's part is to create a function that can interact with your computer (as simple as os.execute(), or system() (in C), instead of inefficiently having to do it through other programming languages.


An arduino can ONLY send serial data to the computer, and nothing in the arduino's software can change that.

You could write something similar to bash that reads from the serial port rather than a keyboard, which would be a generic handler.

Quote

"Lua can read the serial port, so one script is all you technically need."
Do you know how this would be done? No need for code, just an explanation. Thanks.

Nope, never programmed in lua. Have you googled it?

nate890

"Nope, never programmed in lua. Have you googled it?"
Not yet, gotta go out, will when I get back.

Go Up