Closed slavi888 closed 5 years ago
Are you calling send from within an interrupt by any chance?
I've found that I have to add to my code the following line Serial1. Begin (9600); Before ICSC. Begin (); That's because ICSC. Begin does not initialize serial port Now everything works fine. Thanks
Sorry for my not good English. I migrate from old version of library to new so I can use software serial. During migration I found that function Send() not working. This is on hardware serial Serial1 on arduino mega. Code stop at this function and waits until infinity. I research proglem and function waitForTransmitToComplete(); This function does flush of serial and here code "freezes"
void ICSC::waitForTransmitToComplete() { Serial.println("w 1"); if (_dePin == -1) //Skip flush return; Serial.println("w 2");
if defined(ARDUINO) && ARDUINO >= 100
if ARDUINO >= 104
Serial.println("w 3"); _dev->flush(); Serial.println("w 4");
else
Serial.println("w 5"); _dev->flush(); Serial.println("w 6");
Serial.println("w 7");
I can see control print Serial.println("w 5"); and not see Serial.println("w 6");
I think there is problem in line _dev->flush();
Can I comment this line? What is right way to continue use ICSC library? Thank you.