Я работаю с модулем Ciseco srf, пытающимся отправить «+++» с arduino nano. Мой кодArduino отправить символы ascii без возврата каретки
bool b =false;
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
Serial.write('+');// Ihave tried Serial.write("+++")
Serial.write('+');// but this sends "+++<CR>" :(
Serial.write('+');
}
void loop() {
String content = "";
char character;
if(!b)
{
//Serial.print("sent");
b = true;
}
while(Serial.available()) {
character = Serial.read();
content.concat(character);
}
if (content != "") {
Serial.println(content);
}
}
Проблема заключается в Arduino, кажется, отправить возврат каретки <CR>
на Serial.write("+++")
или другой комбинации. Может ли кто-нибудь помочь мне отключить возврат каретки на Arduino и быть строгим для программирования последовательной связи?