Interrupt and serial read problem

I just found out that serial read is interrupt driven.
In my project, I wish to check each character received from a Bluetooth module (a HC-05), and based on the data received, the brightness of the lamp will vary. An signal come from a zero-crossing detector is connected to the interrupt pin (pin 2, on Uno)
I just messed with the ISP and the serial.read function in the code:

char command; 
String string; 
boolean loadon = false;

int AC_LOAD = 3;    // Output to Opto Triac pin
int dimming = 128;  // Dimming level (0-128)  0 = ON, 128 = OFF

void loadOn()
{
 digitalWrite(AC_LOAD,HIGH);
 delay(10);
}

void loadOff()
{
 digitalWrite(AC_LOAD,HIGH);
 delay(10);
}
void setup()
{
 Serial.begin(9600); //Bluetooth
 pinMode(AC_LOAD, OUTPUT);// Set AC Load pin as output
 attachInterrupt(0, zero_crosss_int, RISING);  
}


void zero_crosss_int() 
{
 int dimtime = (75*dimming);    // For 60Hz =>65    
 delayMicroseconds(dimtime);    // Wait till firing the TRIAC
 digitalWrite(AC_LOAD, HIGH);   // Fire the TRIAC
 delayMicroseconds(10);         // triac On propogation delay (for 60Hz use 8.33)
 digitalWrite(AC_LOAD, LOW);    // No longer trigger the TRIAC (the next zero crossing will swith it off) TRIAC
}

void loop()  {
if (Serial.available()>0)
 {
   string="";
 }
   while(Serial.available()>0)
   {
     command=((byte)Serial.read());
     if(command==':')
     {
       break;
     }
     else
     {
       string += command;
     }
     //delay(3);
   }
   
   if(string=="TO")
   {
     loadOn();
     loadon = true;
   }
   if(string=="TF")
   {
     loadOff();
     loadon = false;
   }
   
   if ((string.toInt()>0 && (string.toInt()<=255)))
   {   
       analogWrite(dimming,string.toInt());
   }
}

As results, my lamp just flickering or nothing change after send some code from the phone.
Is there any approach that solve this problem ? Such like stop the interrupt temporarily (at least stop to check at pin 2) but wont messed with the serial.read function ?
Any advice will be appreciated. TQ

Get rid of the delayMicroseconds() within your ISR. An ISR should be as short as possible. If it is short it will not noticeably affect Serial input.

Don't use Strings (capital S) as they can corrupt the small memory in an Arduino. Have a look at Serial Input Basics which uses strings (small s) which are arrays of type char.

It would help if you give a verbal description of what you want the program to do.

...R

Get rid of the delayMicroseconds() within your ISR. An ISR should be as short as possible. If it is short it will not noticeably affect Serial input.

That code has to be written that way, to dim AC lights.

OP: What are you sending to the Arduino, via the serial port.

I'd like to kick you ass for naming the stupid String instance string. A string is something completely different.

 analogWrite(dimming,string.toInt());

The syntax is incorrect, it is analogWrite(pin, value). Dimming is =128 and is not a pin number.

Can the bluetooth baud rate be increased from 9600?

How much delay in the downslope zero crossing trigger firing be tolerated? How close to zero does it need to be?