Hi there, im completly new here, so please be patient with my english and myself
I am building an audio vu meter consisting of 2 attiny2313 and 1 attiny85,
the attiny85 analyzes 3 analog inputs (left,right,sensitivity) and give these informations via softserial @9600 to the two attiny2313.
then the attiny 2313 takes the information and drives 12 LEDs acording to the information.
now to my original problem:
the serial data from the attiny85 comes every 2 ms in form of "R20472047*" while :
the first letter defines the color,
the next 4 byte define the leds (convertet to binary) on the left side
and the last 4 byte the leds of the right side
when i disconnect the atmega 386 from the uno board i can check the serial signals comming from the attiny and the seem just fine,
so the sending code works defenetly.
the problem is the receiving code. testing it with the uno first, i cant get write the serial.read to a char array
( string is to big in space as the attiny2313 just have 2k memory)
it simply wont write anything to the input. the funny thing is, that if i watch the counter via serial, it just counts to 1 and does not increas, although the line must be executet.
here is my code so far:
char input[9],L[4],R[4];Â // buffer for the readings
char current;Â Â // buffer for readed byte
boolean lineComplete = false,sol=false,red; //bool for line complete, start of line, and color status
//String debug="";Â Â //debug string for testings
void setup() {
 Serial.begin(9600); //start serial connection
}
void loop() {
 int c=0;    //counter for the reading process
 memset(input, 0, sizeof input); //clear input
while ( (Serial.available()) && (c<=30) && (!lineComplete) )//wait till something is received
{
 current = Serial.read();                 // read current byte
 if (current == 'R'||current == 'B'&&sol==false)     //checking if first byte is read
 {Â
  sol=true;      //activate start of line Â
 }
 if (sol==true)     // did the start of the line already come?
 {Â
  input[c] = current; //write the byte to the buffer
  c=c+1;        //increase counter by one
  //debug +=c;     //c first thought c not counting?
 } Â
 if (current == '*'&&sol==true)    //check if the end of line sign (*) is in buffer
 {Â
  Serial.flush();
  input[c]='\0';           // null terminate the array
  lineComplete = true;        // seting the line complete string       Â
  sol=false;             // reset the start of line flag
 }
}
if (lineComplete) {Â Â Â Â Â Â Â Â Â //is the line complete ?then this shows the data,or at least it should
//Serial.println(debug);Â Â Â Â Â Â Â Â
Serial.print("complete:");
Serial.println(input);
debug="";
lineComplete = false;Â Â Â Â Â Â Â Â //reset the line complete
c=0;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â // reset the counter
}
//Serial.println("end of code");
}
it seems like the serial data is not received corectly, but if i just send the received curent to the serial, every seems to be received.
help anyone? T_T