six minute clock

Hie everyone, im trying to make a six minute clock and failing hard. Im using 74ls47 and 3 seven segments
the error im getting is “dectobcd not declared in this scope” this is what i could write help please

byte a, b, bit_value, count1, converted1, count2, converted2, check1, up=12;
byte segments_pins={0,1,2,3,4,5,6,7,8,9,10,11};
void setup()
{
for(a=b;a<=11;a++)
{
pinMode(a,OUTPUT);
pinMode (up, INPUT);
}

count1=0;
converted1=0;
count2=0;
converted2=0;
}
void loop()
{
while (1)
{
check1=digitalRead(up);
if(check1==0)
{

a=7;
for(b=0;b<=7;b++)
{
bit_value=bitRead(converted1,a);
digitalWrite(segments_pins,bit_value);
a–;
}
count1++;
delay(300);
converted1=dectobcd (count1);

if (count1==99)

{
count2++;
}

a=7;
for(b=0;b<=7;b++)
{
bit_value=bittRead(converted2,a);
digitalWrite(segments_pins,bit_value);
a–;

}

delay(300)
converted2=dectobcd(count2);
if (count2==6)
break;
}
}
byte dectobcd (byte x)
{
byte q1, r1;
q1=x/10;
r1=x%10;
q1=q1<<4;
q1=q1|r1;
return q1;
}

Is that all the error message? Where are the code tags?

void loop()
{
while (1)

What do you think that loop() does?

And don't bother looking for your near-identical post - I deleted it.

I'm out now, time-waster.

this was all. we arent using any tags

Please read the how to post sticky, that is where you will find your tags.

You should also assign something to b before you use it.

the error im getting is “dectobcd not declared in this scope”

The error messages that I get are

sketch_mar28a.ino: In function 'void loop()':
sketch_mar28a:28: error: invalid conversion from 'byte*' to 'uint8_t'
sketch_mar28a:28: error: initializing argument 1 of 'void digitalWrite(uint8_t, uint8_t)'
sketch_mar28a:45: error: 'bittRead' was not declared in this scope
sketch_mar28a:46: error: invalid conversion from 'byte*' to 'uint8_t'
sketch_mar28a:46: error: initializing argument 1 of 'void digitalWrite(uint8_t, uint8_t)'
sketch_mar28a:52: error: expected `;' before 'converted2'
sketch_mar28a:58: error: a function-definition is not allowed here before '{' token
sketch_mar28a:65: error: expected `}' at end of input

Just a few quick modifications. Now it compiles. Function? No idea.

byte a, b, bit_value, count1, converted1, count2, converted2, check1, up = 12;
byte segments_pins[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
void setup()
{
  for (a = 0; a <= 11; a++)//-------------------A=b > a=0 seems more appropriate
  {
    pinMode(a, OUTPUT);
    pinMode (up, INPUT);
  }

  count1 = 0;
  converted1 = 0;
  count2 = 0;
  converted2 = 0;
}
void loop()
//{ ---------------------------gone
//  while (1)------------------gone
{
  check1 = digitalRead(up);
  if (check1 == 0)
  {

    a = 7;
    for (b = 0; b <= 7; b++)
    {
      bit_value = bitRead(converted1, a);
      digitalWrite(segments_pins, bit_value);
      a--;
    }
    count1++;
    delay(300);
    converted1 = dectobcd (count1);
    if (count1 == 99)
    {
      count2++;
    }
    a = 7;
    for (b = 0; b <= 7; b++)
    {
      bit_value = bitRead(converted2, a);//--------------bittRead to bitRead
      digitalWrite(segments_pins, bit_value);
      a--;
    }
    delay(300);//----------------------------------------- semicolon added
    converted2 = dectobcd(count2);
    if (count2 == 6) ; //----------------------------------semicolon added
    // break; ---------------------------------------------gone
  }
}
byte dectobcd (byte x)
{
  byte q1, r1;
  q1 = x / 10;
  r1 = x % 10;
  q1 = q1 << 4;
  q1 = q1 | r1;
  return q1;
}

There is no reason to set up as an input 11 times.