Two virtual looping instances.


hey,
in program, want 2 sets of code run @ different time instances.
basically, want external lcd refreshing information every 333ms, , want arduino send data serially visual basic program every second (3 x 333ms).

however, i'm having problems implementing this.


code: [select]


int serialcount = 0;

void setup(){}

void loop(){
serialcount++;

if (serialcount=3){
...
insert serial.print code here
...
serialcount=0}


delay(333)
}


the code inside if statement should working every third loop, running every loop instance.

what missing?

in c++ comparison operator ==, not =

try
code: [select]
if (serialcount == 3)


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Two virtual looping instances.


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums