Counting questions..

Well two questions...

I want to count how many times something happings in a loop..

so.. approx:-

int countTEST=0;

Void  loop:-
{If(blah,blah )

++countTEST;// this increments the count by 1}

so I've got that..

If I wanted my display to display the count.. would this work?

lcd.setCursor(0,1);// 
  lcd.print(countTEST);

my second question is i would want an led to blink a number of times, to indicate waht the count number is,-- (this is really where I'm stuck.

cheers

David

You have a variable that holds the number of times to blink the LED, which is a good start. Have a look at the 'blink without delay' sketch to see how not to tie up the processor whilst blinking an LED.

Please post the whole of your existing program to get more help but read the 'sticky' thread at the beginning of this section of the forum before you do.