can't find AttachRTS() in HardwareSerial

blongworth

New member
Hi,

I'm trying to use hardware flow control when communicating over serial with a SRS RGA. This code:

Code:
// set this to the hardware serial port you wish to use
#define RGA Serial4

void setup() {
  Serial.begin(9600);
  RGA.attachRTS(3);
  RGA.begin(28800, SERIAL_8N1);
}

gives this error on compile:

Code:
 'class HardwareSerial' has no member named 'attachRTS'

I've tried this in Arduino IDE 2.0.3 (with the teensy stuff installed) and with PlatformIO. I'm new to Arduino. Am I missing something about how to import the teensy-specific HardwareSerial library/class? I can see attachRTS when I include HardwareSerial.h and navigate to the header file with the IDE, but it still doesn't find the member/method on compile.

thanks,
-Brett
 
Embarrassingly, yes, that's it. I was staring right at it in the header file and on the pjrc website. Sigh.

Thanks,
-Brett
 
Back
Top