I want to use dwin display with software serial using mega board but it's giving me some time wrong value but when i use same code for uno it work

#include <SoftwareSerial.h>

const byte rxPin = 12;
const byte txPin = 13;

SoftwareSerial mySerial(rxPin, txPin); // RX, TX

unsigned char Buffer[9];

void setup() {

Serial.begin(115200);

mySerial.begin(115200);

}

void loop()
{
if (mySerial.available())
{
for (int i = 0; i <= 8; i++)
{
Buffer[i] = mySerial.read();

    Serial.println(Buffer[i]);
  }
}

}

You shouldn't be SoftwareSerial'ing with a Mega.

1 Like

actually i already used 4 hardware serial on mega i want more 6 how can i get is there any alternative method ??

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.