Left for archival purposes.

User avatar
By wififofum
#3274 Functions for UART:

uart.detach = detach the uart from the lua interpreter
uart.attach = reattach the uart to the lua interpreter
uart.configure(baudrate,parity,...) = configure uart
uart.onreceive = callback for data received
uart.write = transmit data
uart.read = read data
uart.onwritefinish = callback for data transmitted
uart.TXenable
uart.RXenable
User avatar
By gerardwr
#3282 Agree, at least please add a function to get input from the user via the serial port, similar to io.read.

Below an example for io.read:
Code: Select allio.write('Hello, what is your name? ')
local name = io.read()
io.write('Nice to meet you, ', name, '!\n')
User avatar
By gerardwr
#3293
zeroday wrote:read from uart, will be added soon after I'm back from business trip. before 1-wire.

Nice, bon voyage!