programming Arduino Uno to add prices of products- RFID based

Currently I have code to swipe in rfid tags to a reader which then using the arduino Uno it lights up an LED coordinating to which tag was swiped. What I’m looking to do now is set a dollar amount to each tag and once a tag is swiped in add it to like a current total price and then output that to LCD Screen. Is this possible with Arduino Uno? Anyone help with this?

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

//Register your RFID tags here
char tag1[13] = "5000B9A7155B";
char tag2[13] = "520000367410";
char tag3[13] = "52000007F4A1";
char tag4[13] = "52000037FF9A";
char tag5[13] = "520000075306";
// char tag6[13] = "01023C000E31";
// char tag7[13] = "01023C0A3207";
// char tag8[13] = "1A004116317C";
// char tag9[13] = "1E009A81F9FC";
// char tag10[13] = "1A004162261F";

double total=0.00;

void setup(){
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);

  Serial.begin(9600);

  pinMode(RFIDResetPin, OUTPUT);
  digitalWrite(RFIDResetPin, HIGH);

}

void loop(){

  char tagString[13];
  int index = 0;
  boolean reading = false;

  while(Serial.available()){

    int readByte = Serial.read(); //read next available byte

    if(readByte == 2) reading = true; //begining of tag
    if(readByte == 3) reading = false; //end of tag

    if(reading && readByte != 2 && readByte != 10 && readByte != 13){
      //store the tag
      tagString[index] = readByte;
      index ++;
    }
  }

  checkTag(tagString); //Check if it is a match
  clearTag(tagString); //Clear the char of all value
  resetReader(); //eset the RFID reader
}

void checkTag(char tag[]){
///////////////////////////////////
//Check the read tag against known tags
///////////////////////////////////

  if(strlen(tag) == 0) return; //empty, no need to contunue

  if(compareTag(tag, tag1)){ // if matched tag1, do this
      total = total + 3.99;
      lcd.print("Milk     $  3.99");
      lcd.setCursor(0,1);
      lcd.print("Total =  $");
      lcd.setCursor(10,1);
      lcd.print(total);
      lcd.setCursor(0,0);
      
  }else if(compareTag(tag, tag2)){ //if matched tag2, do this
      total = total + 2.99;
      lcd.print("Eggs     $  2.99");
      lcd.setCursor(0,1);
      lcd.print("Total =  $");
      lcd.setCursor(10,1);
      lcd.print(total);
      lcd.setCursor(0,0);
  }else if(compareTag(tag, tag3)){


  }else if(compareTag(tag, tag4)){


  }else if(compareTag(tag, tag5)){
   

  }else{
    Serial.println(tag); //read out any unknown tag
  }

}

What I'm looking to do now is set a dollar amount to each tag and once a tag is swiped in add it to like a current total price and then output that to LCD Screen. Is this possible with Arduino Uno?

Of course, and it's even trivial.

The checkTag() method know which tag has been read. It can increment a variable by different amounts, based on which tag it recognizes. At the end of the method, write the variable's value to the LCD.

Anyone help with this?

What help do you need?

Yes the checktag() method knows which tag is swiped in. The help I need is setting it up, the setup I have currently for my products does that look correct?

if(compareTag(tag, tag1)){ // if matched tag1, do this
      total = total + 3.99;
      lcd.print("Milk     $  3.99");
      lcd.setCursor(0,1);
      lcd.print("Total =  $");
      lcd.setCursor(10,1);
      lcd.print(total);
      lcd.setCursor(0,0);
      
  }else if(compareTag(tag, tag2)){ //if matched tag2, do this
      total = total + 2.99;
      lcd.print("Eggs     $  2.99");
      lcd.setCursor(0,1);
      lcd.print("Total =  $");
      lcd.setCursor(10,1);
      lcd.print(total);
      lcd.setCursor(0,0);

If so how, how do I pass in the total to be printed on the LCD?

the setup I have currently for my products does that look correct?

If total is a float, yes.

If so how, how do I pass in the total to be printed on the LCD?

Just like you are doing.

  }else if(compareTag(tag, tag2)){ //if matched tag2, do this

Put the else if statement on a new line, so it stands out.

Thanks, I will continue to work on it and come back if I have more issues.