                  sprintf(serial_out, "CI#");
                  i += num_consumed_total;
                }
+               else
+                 i++; // incomplete string
          }
+         else
+           i++;// incomplete string
     }
     else
       i++;

void setup() 
{
  first_start = 0;
  strcpy(firmware_version, "2016.02.20.3s");
  
  current_buffer[0] = 0;


            }
            else
              i++;// error on incomplete string (does nothing)
        }
        else
          i++; // incomplete string  
      }
      else
          if (tmp_str[i] == 'P' || tmp_str[i] == 'p'){// potentiometer            
