user56647: I just can't make it work for some reason. I tried #include <SoftwareSerial.h> and I tried #include "SoftwareSerial.h". Can someone help me?
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11);

uint16_t buf[256];

void setup() {
  Serial.begin(9600);
  while(!Serial);
  for(int i = 0; i < 256; i++)
    buf[i] = (uint16_t)i;
}
  mySerial.begin(4800);
  mySerial.println("Hello, world"); //printLn  L, not I

void loop() {
  Serial.write((uint8_t*)buf, 512);
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}


user56647: simple mistake mySerial.begin(4800);
  mySerial.println("Hello, world"); lines was out of void {}
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11);

uint16_t buf[256];

void setup() {
  Serial.begin(9600);
  while(!Serial);
  for(int i = 0; i < 256; i++)
    buf[i] = (uint16_t)i;
   mySerial.begin(4800);
  mySerial.println("Hello, world"); //printLn  L, not I 
}


void loop() {
  Serial.write((uint8_t*)buf, 512);
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}


56647: <p>I just can't make it work for some reason. I tried <code>#include &lt;SoftwareSerial.h&gt;</code> and I tried <code>#include "SoftwareSerial.h"</code>. Can someone help me?</p>

<pre><code>#include &lt;SoftwareSerial.h&gt;

SoftwareSerial mySerial(10, 11);

uint16_t buf[256];

void setup() {
  Serial.begin(9600);
  while(!Serial);
  for(int i = 0; i &lt; 256; i++)
    buf[i] = (uint16_t)i;
}
  mySerial.begin(4800);
  mySerial.println("Hello, world"); //printLn  L, not I

void loop() {
  Serial.write((uint8_t*)buf, 512);
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}
</code></pre>
 56647: <p>simple mistake mySerial.begin(4800);
  mySerial.println("Hello, world"); lines was out of void {}</p>

<pre><code>#include &lt;SoftwareSerial.h&gt;

SoftwareSerial mySerial(10, 11);

uint16_t buf[256];

void setup() {
  Serial.begin(9600);
  while(!Serial);
  for(int i = 0; i &lt; 256; i++)
    buf[i] = (uint16_t)i;
   mySerial.begin(4800);
  mySerial.println("Hello, world"); //printLn  L, not I 
}


void loop() {
  Serial.write((uint8_t*)buf, 512);
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}
</code></pre>
