doc:lua_make-your-own-scripts
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
doc:lua_make-your-own-scripts [2014/05/31 11:39] – [Miscellaneous Commands] admin | doc:lua_make-your-own-scripts [2014/08/17 10:51] – [The Communication Commands] admin | ||
---|---|---|---|
Line 137: | Line 137: | ||
==== The Communication | ==== The Communication | ||
+ | |||
OOBD uses (actual) serial communication to talk to the diagnostic device. To allow Lua to send and receive data from the serial port, a few extended Lua functions exists: | OOBD uses (actual) serial communication to talk to the diagnostic device. To allow Lua to send and receive data from the serial port, a few extended Lua functions exists: | ||
+ | |||
=== serFlush() === | === serFlush() === | ||
+ | |||
It just clears the input buffer (from anything which was maybe received in the meantime and which is not needed anymore) | It just clears the input buffer (from anything which was maybe received in the meantime and which is not needed anymore) | ||
Line 146: | Line 149: | ||
=== serWrite(String) === | === serWrite(String) === | ||
- | |||
- | Sends //String// to the output (which is normally the serial port) | ||
+ | Sends //String// to the output (which is normally the serial port) | ||
=== serSleep(milliseconds) === | === serSleep(milliseconds) === | ||
- | waits // | ||
+ | waits // | ||
=== serReadLn(msTimeout) === | === serReadLn(msTimeout) === | ||
+ | |||
reads from input until a LF (dez. 10 hex 0x0A) appears and returns that input as String | reads from input until a LF (dez. 10 hex 0x0A) appears and returns that input as String | ||
+ | |||
=== serWait(OptionString, | === serWait(OptionString, | ||
- | In case you want to wait for some input strings, of which several could appear, you fill the // | ||
+ | In case you want to wait for some input strings, of which several could appear, you fill the // | ||
==== Miscellaneous | ==== Miscellaneous |
doc/lua_make-your-own-scripts.txt · Last modified: 2019/04/08 18:43 by admin