How to make Arduino runs continuous routines even inside a "switch case loop".

What you posted in reply #8 was this

void loop(){
  if(Serial.available()){
    ch=Serial.read();}
    switch(ch)

So, with the "read" and the "switch at the same level of indentation, it is difficult to spot the trailing "}"

void loop()
{
  if(Serial.available())
  {
    ch=Serial.read();
  }
  switch(ch)

is much easier on the eye, and easier to spot the program flow.