Problem with Toggle Switch Input

I guess that I do not understand.

No that would be me lol - I added your code and added a new parse function -

void dataInput(){
    //swtest 2
  // PIN
  if (data == 255  )
  {
    int tmp = 4;
    digitalWrite(tmp, HIGH);
  }
  if ( data == 254) {
    int tmp = 4;
    digitalWrite(tmp, LOW);
  }
}

This provides exactly what I was trying to accomplish - I cannot thank you enough, I have been working this problem for many hours. It was unclear to me why the parse function worked when sent from the serial port, but seemed to be unrecognized when send from the shift register. I had never encountered the bitSet or BitClear commands - they work perfectly.

If interested I have another problem to tackle that is similar - In the attached .ino I would like the expression builder to recognize floating point values. It seems like it should be simple, but it is not my code and attempts to change the data types, parse function etc. have not resulted in being able to do so.

In any case - thanks for the code suggestion!

TinyBasicPlus.ino (45.6 KB)