0

Using Arduino Uno with 3.5mm Jack connected to ground and pin 1 for TX

Need to send two commands I want to send 0XAA13FE010113 for Mute on, and 0XAA13FE010012 for Mute off.

Simple Serial Command to turn Monitor Mute on and off every 5 seconds....

tried everything byte character, array, write with hex, print :(

Thx for a helping a rookie I want to impress my team


Ideal quick answer below. thx to @martynas

uint8_t muteON[] = { 0xAA, 0x13, 0xFE, 0x01, 0x01, 0x13 };
uint8_t muteOFF[] = { 0xAA, 0x13, 0xFE, 0x01, 0x00, 0x12 };
.... 
void loop() {
 Serial.write( muteON, sizeof(muteON) );  
 delay(5000);               // wait for 5 second
 Serial.write( muteOFF, sizeof(muteOFF) );
 delay(5000);               // wait for 5 second
}
2
  • 2
    What have you tried so far? Don't expect people here to do EVERYTHING for you! How would you "impress your team" with something other people would have completely done for you?
    – jfpoilpret
    Commented Nov 6, 2014 at 5:26
  • Please add some code to your question so we can help debug it.
    – sachleen
    Commented Nov 6, 2014 at 17:32

1 Answer 1

1

there are 6 bytes just make

byte muteON[] = {0xAA,0x13,0xFE,0x01,0x01,0x13};
byte muteOFF[] = {0XAA,0x13,0xFE,0x01,0x00,0x12};
...
/* To send mute ON comand */
for(byte i =0;i<sizeof(muteON);i++)(Serial.write(muteON[i]));
/* To send mute OFF comand */
for(byte i =0;i<sizeof(muteOFF);i++)(Serial.write(muteOFF[i]));
5
  • I do not know you, your programming level etc. Wrote as clear as i could
    – Martynas
    Commented Nov 6, 2014 at 10:13
  • So is it working?
    – Martynas
    Commented Nov 6, 2014 at 12:01
  • Also you can use SoftwareSerial. Then you can choose Tx pin
    – Martynas
    Commented Nov 6, 2014 at 12:04
  • I am using Arduino uno. when setting Serial.begin(9600); does that send serial output via usb and pin 1?
    – Nikola
    Commented Nov 6, 2014 at 22:48
  • No you just set the output baud rate.
    – Martynas
    Commented Nov 7, 2014 at 5:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.