The command to reboot the 835 looks like this and works fine in my C program, now I'd like to take input to draw a box, but there is no good example in the linux sample code, can you help?
Working example for a reboot that I was able to figure out
Command Packet:
type = 0x05 = 5 10
data_length: 3
data[0]: 8
data[1]: 25
data[2]: 48
which in a C program looks like this
int
reboot=0;
if((!strcmp(argv[2],"reboot"))) reboot=1;
if(reboot)
{
outgoing_response.command = 5;
outgoing_response.data[0]=8;
outgoing_response.data[1]=18;
outgoing_response.data[2]=99;
outgoing_response.data_length = 3;
send_packet();
for(k=0;k<=10000;k++)
check_for_packet();
Uninit_Serial();
}
and works fine, how do I do the same with the command packet 28 to draw a box in C?
Command Packet:
type: 0x28 = 40 10
data_length: 7
data[0]: 7 (Draw a Rectangle)
data[1]: x pixel location (top-left)
data[2]: y pixel location (top-left)
data[3]: rectangle width
data[4]: rectangle height
data[5]: line shade
data[6]: fill shade (0 is transparent)
Thanks,
Ken
Working example for a reboot that I was able to figure out
Command Packet:
type = 0x05 = 5 10
data_length: 3
data[0]: 8
data[1]: 25
data[2]: 48
which in a C program looks like this
int
reboot=0;
if((!strcmp(argv[2],"reboot"))) reboot=1;
if(reboot)
{
outgoing_response.command = 5;
outgoing_response.data[0]=8;
outgoing_response.data[1]=18;
outgoing_response.data[2]=99;
outgoing_response.data_length = 3;
send_packet();
for(k=0;k<=10000;k++)
check_for_packet();
Uninit_Serial();
}
and works fine, how do I do the same with the command packet 28 to draw a box in C?
Command Packet:
type: 0x28 = 40 10
data_length: 7
data[0]: 7 (Draw a Rectangle)
data[1]: x pixel location (top-left)
data[2]: y pixel location (top-left)
data[3]: rectangle width
data[4]: rectangle height
data[5]: line shade
data[6]: fill shade (0 is transparent)
Thanks,
Ken
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.