Hello Guys,
I've purchased a 3D printer running marlin firmware. I am willing to do some modifications on the firmware to incorporate another hardware into the setup.
Basically, as we all know, the serial 0 is the one used to connect to our PC and communicate/command the 3D printer. However, I want to configure and use serial port 2 (which is being used by the LCD - I want to remove it - I don't really need it nor SD Card) to communicate with my other device which should be turn on/off depending of the received sms from serial port 2.
So, for instance, I would like to do, somewhere, Serial2.begin(BAUDRATE)... etc etc... Serial2.write("Turn Off/Turn On"). I noticed that I can't even do Serial2.begin because the code is somewhat modified by the creators.
I've found this useful topic "http://forums.reprap.org/read.php?147,231771" (thanks to jamesdanielv) where the bluetooth(bt) is configured in a such way that is echo of serial port 0, i.e, I can either send commands via rx0 tx0 or btrx bttx. However, I do pretend two independent serial ports (PC - Arduino SerialPort0 ; Arduino - Mydevice SerialPort2). For instance, If I do myserial.println("TurnON"); (bt-serial) and If I debug it, I am not getting anything, however, if I do debug it on rx2/tx2 I do get something but the messages appear kinda distorted...
I am really looking forward for some expertise (i've recently starting using arduino) and I would be very thankful,
Best Regards