Help needed with a binary to decimal converter!

“Create a circuit and write the code to create a binary (base 2) to decimal (base 10) decoder”
We built the model and wrote out some of the code but it still won’t work, here’s what we’ve got so far:

#include <LiquidCrystal.h>

LiquidCrystal lcd(9, 8, 5, 4, 3, 2);

const int switchPin = 13;
int switchState = 0;
int prevSwitchState = 0;

void setup(){
 lcd.begin(16,2);
 lcd.print("hello");
 lcd.setCursor(0, 1);
 lcd.print("hey");  
 
 pinMode(13, OUTPUT);
 pinMode(switchState, OUTPUT);
}

void loop(){
 switchState = digitalRead(switchPin);
 
   if(switchState != prevSwitchState) {
     if (switchState = LOW) {
       lcd.clear();
       lcd.setCursor(0, 0);
       lcd.print("gggg");
       lcd.setCursor(0, 1);
     }
   }
}

We’ve got all the switches, display and wiring.

We only need to know what we need to add to the code to make it convert binary into decimals in the following pattern:
0000 = 0
0001 = 1
0010 = 2
0011 = 3
0100 = 4
0101 = 5
0110 = 6
0111 = 7
1000 = 8
1001 = 9
1010 = 10
1011 = 11
1100 = 12
1101 = 13
1110 = 14
1111 = 15

We keep getting an error saying the “LCD is not declared”.
thank you

This is not the part of the forum where you ask us to do your homework for you.
That is over in Gigs and Collaborations. The area where you pay people to do work you do not want to do.

This is the section of the forum where we help you if you are having difficulty with your code. Or if you need help choosing hardware. Or understanding aspects of the Arduino.

Do you have the 4 buttons? Have you looked for any button tutorials? Try them.
Do you have the LCD screen? Have you looked for any LCD tutorials? Try them.

If you run into problems, come back here and we will gladly help.

GO READ the How to use this forum please read post at the top of this forum. It covers many things that new forum members often do wrong.
Like failing to use a meaningful title.
Like failing to research the topic before posting.

We will help you. But you have to show that you are willing to do the work.

kickstartercrap:
can someone pls help me make the code to this problem

all help is needed

thank you

Help?

More like do your homework problem for you.
That’s called cheating.

SORRY DUDES we had a junior member of our group just copy-paste our assignment in here, the guy's really dumb, I edited it and wrote out what we actually needed help with.

if (switchState = LOW) Oops

kickstartercrap:
SORRY DUDES we had a junior member of our group just copy-paste our assignment in here, the guy's really dumb, I edited it and wrote out what we actually needed help with.

A junior member of your group?

Perhaps you should consider hiring a more senior member who actually knows how to do engineering work.

It still seems like a group homework problem to me.

Do your own work.

We keep getting an error saying the "LCD is not declared".

Well, the string LCD doesn't appear anywhere in the code you so badly posted.
Are you sure that's the exact error message?
Or are you actually trying to compile some other code?

You've got five minutes between posts - use those minutes wisely.