buttons are typically connected between the pin and ground, the pin configured as INPUT_PULLUP to use the internal pullup resistor which pulls the pin HIGH and when pressed, the button pulls the pin LOW.
i fixed everything, thank you. i move on to my next assignment and have another problem, this time my lcd cant display my measument from the dht 11 temp&humidity sensor. here is the schematic
the schematic does not have dht 11 sensor cause tinkercad does not have it, but im sure that i have correctly hooked up the sensor cause i tried a simple code like hello world and the lcd still does not display anything
Think about what you've just said. This is the equivalent of "I know I'm not speeding because my car isn't pink". Whether the sensor is connected correctly has no bearing on the functioning of the LCD.
So the display is blank? Or the value it shows doesn't make sense? Please be specific, it's essential when describing problems.
the display is blank, first i thought there was a problem with my code, so i tried using a simple Hello World to test the display and it still did not work
Stick with the "Hello, World" code until you get it displayed, don't worry about the sensor(but remove it, in case you did make a mistake there).
There are many types of 16x2 LCD out there, so it's possible the one you have isn't happy with the way the LCD library is handling it. In a case like that, I'd go with Bill Perry's exhaustive hd44780 LCD driver, it's your best chance for success. It's in the 'manage libraries' selection in your IDE. Type HD44780 in the search box, and scrolldown in the results until you find it. You may need to modify your calls to be successful, so message back here if you're having issues.