Hello Everyone
I'm having trouble in combination of Ethernet Module,RFID reader and MySQL server.
Ethernet module can write data to MySQL server fine.Also RFID reader is reading data from cards fine.
But sometimes RFID freezes or Ethernet Module stops sending data.
And i don't know the reason.Because it's happening randomly not a same specific condition.
Its on Arduino Mega and RFID Ethernet Module sharing the same pins 50-52.
I'm controlling Ethernet module ENC28J60 using CS pin on the other side i'm controlling RC522 RFID using SDA pin(i'm not sure about it but someone on the forum mentioned to do this).
I included my code and php files used to communicate with MySQL.
Any advice will be approciated.
Thanks for your advice.
Between what do you mean by Software Serial?
I only used serial to communicate with PC.
And mostly when trouble occurs i restart Arduino and mostly it fixes the problem.
If the problem "goes away" when you restart the Mega, the problem is likely to be your use of the String class. It may get better is you define message, limiter, lattitude, longditude and middle as global variables and reserve space for them with the reserve method of the String class. reserve() - Arduino Reference
Alternatively, use char arrays in place of Strings.