Quantcast
Channel: Reprap Forum - Firmware - Marlin
Viewing all articles
Browse latest Browse all 2831

Execute gcode with softwareserial (no replies)

$
0
0
Hi,
I added a new gcode M3333 for communication with Nextion Display and I am using SoftwareSerial.

void GcodeSuite::M3333() {
    SoftwareSerial mySerial(PA10, PA9); // RX, TX
    mySerial.begin(9600);
    mySerial.print(parser.string_arg);
    mySerial.write(0xff);
    mySerial.write(0xff);
    mySerial.write(0xff);
    mySerial.listen();
    while(mySerial.available()>0) {
    char c = mySerial.read();
    //if(c != '\n')
    Serial.write(c);
  }
}

This code works properly For ex: M3333 page page1 or M3333 b0.val=10

But I am trying to send commands from the Nextion display to Marlin firmware. I was trying a few things but not working. Therefore I need a suggestion. If you can help me I would be glad.

Regards

Viewing all articles
Browse latest Browse all 2831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>