Guidance on Circuit Assembly

Greetings all,

Apologies in advance if this is not the correct place to post this, but I need some help on a circuit I need for a school project.

I'm following the tutorial here the circuit is just about the same. In my application I have a 12V solenoid valve instead of a DC motor. I have also changed the code to the following,

/*

*/

// verify that these pins are correct for the variable names
int pushButton = 2;
int valveControl = 13;

void setup() 
  {
  // put your setup code here, to run once:
  pinMode(pushButton, INPUT);
  pinMode(valveControl, OUTPUT); 
  }

void loop() 
  {
  // put your main code here, to run repeatedly:
  if(digitalRead(pushButton == HIGH))
      {
        digitalWrite(valveControl, HIGH);
        delay(10);
        digitalWrite(valveControl, LOW);
      }
  else
      {
        digitalWrite(valveControl, LOW);
      }
  delay(3000);    
  }

I tried using TinkerCad to simulate the circuit before building it, but the issue I am having is that it appears PIN 2 is constantly having a 5V input despite the switch being in place to open the circuit. Meaning that the valve would just be opening and closing regardless of the push button being pressed. If anyone could look at my circuit or code and please help me understand where I have made my mistake I would greatly appreciate it. Thank you

TinkerCad link: Login | Tinkercad

This will allow you to edit the simulation just FYI.

I can't copy-paste from that online code to show you where your error is. I can see it but I'm not able to copy it to here to show you.

If you post your code here, following the guidance on posting code, then anyone here can help you.

Do you have the 10k pulldown on your bushbutton like in the tutorial? It is required.

Response on your thinkercad link:

Oops!
410 - The requested page has expired

luke24:
I have also changed the code to the following,

Somehow your edit and my earlier reply got crossed. I didn't see the code until now.

 if(digitalRead(pushButton == HIGH))

There's your problem. Look carefully at the brackets ().

MorganS:
There's your problem. Look carefully at the brackets ().

So it should read more like the following?

if(digitalRead(pushbutton) == HIGH)

Also attached is just a screenshot of the tinkercad model, since the share link did not work.

It appears you did not connect power to the Arduino in that picture.

It is just part of the software, when I tell it to Start Simulation it "plugs" in the USB cable to power on the board. I just took a snapshot before I started the sim. Thank you for bearing with me though, I finish my ME degree soon and this is the first look I have had at systems like this.