ArduinoRS485 - receive()

Enables reception.

Syntax

RS485.receive()

Parameters

None.

Returns

None.

Example

#include <ArduinoRS485.h>

void setup() {
  Serial.begin(9600);
  while (!Serial);

  RS485.begin(9600);

  // Enable data reception
  RS485.receive();
}

void loop() {
  if (RS485.available()) {
    Serial.write(RS485.read());
  }
}

See also