.sendbyte()
darnit
Posts: 25
.sendbyte() seems to only accept an integer value.
such as....
txUart.sendbyte(0xB2)
is there a way for it to use a variable reference, such as
int cmd = 0xB2
txUart.sendbyte(cmd)· or do i have to use
txUart.sendstring()?
I am asking because when i look at the transmit line with an oscope it looks like it takes longer for .sendstring to send the bytes down the line than it takes a series of .sendbyte() statements.
such as....
txUart.sendbyte(0xB2)
is there a way for it to use a variable reference, such as
int cmd = 0xB2
txUart.sendbyte(cmd)· or do i have to use
txUart.sendstring()?
I am asking because when i look at the transmit line with an oscope it looks like it takes longer for .sendstring to send the bytes down the line than it takes a series of .sendbyte() statements.
Comments
an index counter and test for end of string, it does take slightly longer than a series of
.sendByte().
But .sendString() allows to send any contents, whereas with .sendByte() you are
limited to constants or scalar variables.
So it is a tradeof between codesize and speed, as usual.
regards peter