Two virtual looping instances.

Hey,
In my program, I want two sets of code to run at different time instances.
Basically, I want my external LCD refreshing information every 333ms, and I want the Arduino to only send this data serially to my Visual Basic program every second (3 x 333ms).

However, I'm having problems implementing this.

int serialcount = 0;

void setup(){}

void loop(){
serialcount++;

if (serialcount=3){
...
INSERT Serial.print CODE HERE
...
serialcount=0}


delay(333)
}

The code inside the if statement should only be working every third loop, but it running every loop instance.

What am I missing?

In c++ the comparison operator is ==, not =

try

if (serialcount == 3)
delay(333)

Semicolons are good.

Sorry. Just did a quick writeup of code, wasn't actually missing a semi-colon.

I'm more of a VB guy, haven't done much C++, so I'm kind of screwed up on the simple stuff.

I'm more of a VB guy

We can cure you, be patient, all is not lost. ;D