aaaha.
und du meinst, das klappt 100%ig?
bisher habe ich noch nie - aber wirklich: noch nie! - Hardware auf Arduinos zum Laufen gekriegt (schon gar nicht mit dem 3.3V/5V Signal-Level-problem von AVR und DUE), wenn es nicht von vornherein fix und fertig vorkonfiguriert war und sofort auch die passenden libs mitgeliefert wurden. Weder Displays, noch die Pixy Cam, noch den MPU-6050, noch Bluetooth, noch WiFi. Zum low level Hardware programmieren bin ich wirklich nicht in der Lage.
Daher sollte eigentlich auch diesmal alles alles fix und fertig sein, und daher will ich auch keine AT Befehle verwenden müssen.
Einstecken, ein paar Kabel stecken, libs #includen, Serial-Befehle versenden so wie hier, nur dann automatisch eben kabellos per XBee oder 3d-Radio:

Code:
void setup()
{
  // start serial port at 9600 bps:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

  pinMode(2, INPUT);   // digital sensor is on digital pin 2
  establishContact();  // send a byte to establish contact until receiver responds
}

void loop()
{
  // if we get a valid byte, read analog ins:
  if (Serial.available() > 0) {
    // get incoming byte:
    inByte = Serial.read();
    // read first analog input, divide by 4 to make the range 0-255:
    firstSensor = analogRead(A0) / 4;
    // delay 10ms to let the ADC recover:
    delay(10);
    // read second analog input, divide by 4 to make the range 0-255:
    secondSensor = analogRead(1) / 4;
    // read  switch, map it to 0 or 255L
    thirdSensor = map(digitalRead(2), 0, 1, 0, 255);
    // send sensor values:
    Serial.write(firstSensor);
    Serial.write(secondSensor);
    Serial.write(thirdSensor);
  }
}

void establishContact() {
  while (Serial.available() <= 0) {
    Serial.print('A');   // send a capital A
    delay(300);
  }
}