so, now I have a new problem and because this doesn't have the slightest to do with interrupts I decided to make a new topic.
So, problem is: Then I send "?" to the Arduino via the serial monitor it resets or something like that, at least the display is cleared and only the first row has slight boxes.
Why? And why doesn't the board go up and running again?
To be said is, the updateSerial also wants a carriage return (0x0D), and in the serial monitor I have chosen "Carriage return" from the dropdown menu left of the baudrate menu.
So, problem is: Then I send "?" to the Arduino via the serial monitor it resets or something like that, at least the display is cleared and only the first row has slight boxes.
Sounds like you probably have something electrically connected to your arduino that is killing it via overcurrent or a short.
if(Serial.available()){
char data = Serial.read();
char data2 = Serial.read();
You are asuming that if data is available at least two bytes are available, this is not a valid assumption.
Arduino is very fast, so serial.available() might return true when just one byte is available, and you might try to read the second byte before it is available.
Better to use something like:
if(Serial.available()>=2){
char data = Serial.read();
char data2 = Serial.read();
Will never be executed because in the if block just above it you do a return if data=='?'
If your problem only happen when you send the ?, then i would look for the problem in the sendAllToComputer(); function, which you have not posted.
Finally it would be much better to use a switch statement than all the nested if / else If statements. It would make your code much easier to read and undertand, and much less errorprone.