Digole
Digital Solutions
iDigole Buyer ProtectioniDigole Buyer
Protection
My shopping cart
0 Items:
Secure Checkout
Top Rated Plus
Visit Our Live Auctions
99.9% Customer's Satisfaction
 
Forum : Digole Serial Display :

 Search Forum.. 
 Creat New Topic   Reply 

UART format variables B

 I use UART. I read the manual, but I do not understand in what format to write variables in the command. Bad that there are no examples in the manual.

For example, I'm trying to change the font command
echo "SF6TTtest"> / dev / ttyATH0 but it does not work. I went through different options CLSFx6TTtest SF0x06TTtest SF/x06TTtest SF06TTtest
But I did not understand how it works. In what format should be B-one byte?

RE:UART format variables B

 B is "unsigned char" value, not ASCII, you can't do "SF6", you need "SF\x06" in language C

RE:UART format variables B

 

Ok. I can do the same in Linux console?

I tried echo "SF\x06TTtest"> /dev/ttyATH0 it does not work.

RE:UART format variables B

 No, only in C language, otherwise you need send 6 as a byte of value, but you can try software name CoolTerm, this software available for Windows, Mac os and Linux

RE:UART format variables B

 No only C.

I used LUA.

local out = io.open("/dev/ttyATH0", "wb")
out:write("SF" .. string.char(6))
out:write("TTshaurma" .. string.char(0))
 
out:write("SF" .. string.char(10))
out:write("TTshaurma" .. string.char(0))
 
out:write("SF" .. string.char(18))
out:write("TTshaurma" .. string.char(0))
out:close()
 
or in linux console work
 
echo -e "CLSF\x06TTtest" > /dev/ttyATH0

RE:UART format variables B

 Does "TT" command work? if none commands work, you need check the communicating port set up.

RE:UART format variables B

 Everything is fine. The last command that I gave the example of work without problems.

RE:UART format variables B

 Great!

Copyright Digole Digital Solutions, 2008-2017. All rights reserved.
Powered by Victor Sun