help with for loop


i running code receive rfid data, not whole code, when run code gives me output (below code).
where finds code writes there(if code placed 1st in array displays there).
how can receive "authorize" "not authorize" when finds whether in array or not

boolean asd;
for(int l=0;l<5;l++)
{
        for(int o=0;o<5;o++)
            {

 
  if(tagin
  • ==data[l]
  • )
      {
        asd=true;
       
      }
      else
      {
        asd=false;
       }

                }

     
      switch(asd)
      {
      case true:
      {
          for(int k=0;k<5;k++)
      serial.print(tagin[k]);
      serial.println("\nauthorize");
      break;
     
      }
     
      case false:
      {
      serial.print("\nnot authorize\n");
      break;
        }
     
      }
    }












    not authorize
    14522294116101
    authorize

    not authorize

    not authorize

    not authorize

hi, welcome forum.

please click "modify" on first post , add [code] ... [/code] tags around code.


Arduino Forum > Using Arduino > Programming Questions > help with for 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