using XOR in a loop


the code below,  ( in if serial. available() statement, because if serial available, process data format , serial.write )



  checksum  = w ;

checksum ^= gauge ;

  checksum ^= c ;

   checksum ^= zero;

   checksum ^= 30;

byte wtemp[] = { w, gauge, c, zero, 30, checksum};
serial.write(wtemp, sizeof (wtemp)), hex;
delay(100);


the code working , check sum right value want.
except running script, serial.write value once.
the script not looping,  if leave xor functions away, loops perfect. need write check sum value.

anyone know i'm doing damn wrong wont loop ?

you need post full code. can't on snippets alone.


Arduino Forum > Using Arduino > Programming Questions > using XOR in a loop


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support