Arduino to Pioneer AV

Hello ,

I can´t connect to the AV.

The (mz) is the command for mute.

Please Help.

#include <Dhcp.h>
#include <Dns.h>
#include <Ethernet.h>
#include <EthernetClient.h>
#include <EthernetServer.h>
#include <EthernetUdp.h>
#include <util.h>
#include <SPI.h>

byte mac[] = {  
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,3,177);                        // IP des Arduinos
IPAddress server(192,168,3,10);                      // IP des Verstärkers
EthernetClient client;              


void setup()
{


  Ethernet.begin(mac, ip);
  Serial.begin(9600);
  delay(1000);
  
  Serial.println("connecting...");
  
  if (client.connect(server, 23)) {
    Serial.println("connected");
  }
  else {
  Serial.println("connection failed");
  }
}


void loop(){
 if (client.available()) {
    Serial.print("mz");    //mz ist der befehl für Mute der soll einfach mal alles 3 Sekunden an und aus gemacht werden.
  delay( 3000 );
 } }

M3tzl3r:

    Serial.print("mz");    //mz ist der befehl für Mute der soll einfach mal alles 3 Sekunden an und aus gemacht werden.

Would it not be more sensible to send the command to the server instead of just printing it out to serial?
Do you not need a separator between each command, eg. a new line?

I am still a beginner :slight_smile:
Please help.

I'm trying to help you, but you have provided so little information. You haven't even described what is going wrong other than saying that you can't connect.

The point in my previous post was that you are writing the commands out to serial and not to the server.
You could try this instead:

void loop(){
 if (client.available()) {
  client.println("mz");    //mz ist der befehl für Mute der soll einfach mal alles 3 Sekunden an und aus gemacht werden.
  delay( 3000 );
 }
}

I've assumed a new line at the end of the command, but it may not be correct.

Übrigens, es gibt ja auch ein deutschsprachiges Unterforum...

Thank You!
it works!

lg