I want to write "11111111" through serial port connection in C, however, the write() from will read each of the 1 as a character and send a binary representation of 1, which is "0011 0001", how can I solve this problem. And I am using the code from here to open and write through serial port How to open, read, and write from serial port in C?
char *data = "11111111"; char c = strtol(data, 0, 2);
write(port,c,8);
doesn't work. It can be compiled, but there is no signal sent, confirmed by the oscilloscope.