When Serial.begin(9600) is called and I send hex data using Serial.write is the serial data being sent to Pin 1 and aswell as USB UART Tx line ?
I need to send HEX data using pin 1
AA13FE010113
AA13FE010012
Here is my code
uint8_t cmdON[] = { 0xAA, 0x13, 0xFE, 0x01, 0x01, 0x13 };
uint8_t cmdOFF[] = { 0xAA, 0x13, 0xFE, 0x01, 0x00, 0x12 };
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.write( cmdON, sizeof(cmdON) );
delay(5000); // wait for a second
Serial.write( cmdOFF, sizeof(cmdOFF) );
delay(5000); // wait for a second
}
if this is incorrect please advise thx