-->
Page 1 of 2

UART functions

PostPosted: Mon Nov 24, 2014 7:15 pm
by wififofum
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

Re: UART functions

PostPosted: Tue Nov 25, 2014 5:03 am
by gerardwr
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')

Re: UART functions

PostPosted: Tue Nov 25, 2014 7:53 am
by zeroday
read from uart, will be added soon after I'm back from business trip. before 1-wire.

Re: UART functions

PostPosted: Tue Nov 25, 2014 9:44 am
by gerardwr
zeroday wrote:read from uart, will be added soon after I'm back from business trip. before 1-wire.

Nice, bon voyage!