I have been trying to send protocol(data frame) to a camera using arduino uno which is operated by RS232 protocol, for that i used RS232 to TTL module.
My task was to send a data frame to the camera so i can operate its settings over RS232 protocol,
I know it is not a rocket science, simply i just had to send hex bytes through arduino to the RS232 to TTL converter module and the module is connected to the camera,
I have used arduino 0(Rx) pin and 1(Tx) pin for Serial.write() to send data to the RS232 module.
i had to send the following hex values to the camera so that i could zoom in;
0xF0, 0x03, 0x26, 0x02, 0x00, 0x28, 0xFF
so for this i used a simple code for this
byte zoomIn[] = {0xF0, 0x03, 0x00, 0x02, 0x26, 0x28, 0xFF };
void setup() {
Serial.begin(19200);
Serial.write(zoomIn, sizeof(zoomIn));
delay(1000);
}
void loop() {
}
I don't know if that should be a big deal to send this data to the module, and what i think is that the Serial.write() converts hex data into binary and the RS232 module converts it back into the RS232 data.
but unfortunately i can not write settings to the camera even i tried many different baud rates but nothing worked.
please, help is needed and tell me if there is something wrong that i have done.


