Not Having Enough Digital Pins?

hello, im making an air quality monitor and I'm having a problem about display, I used the digital pin 2 ,4 and 7 for my sensors but for my display I don't have enough digital pins, when connect the 16x2 display to different pins it doesn't work and i think i have to use the pins that doesn't have ~ sign on it but i don't have any pins that doesn't have ~ signs, pleassssssssssssseeeee help and I'm using arduino uno with this code:

/*
  LiquidCrystal Library - Hello World

 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.

 This sketch prints "Hello World!" to the LCD
 and shows the time.

  The circuit:
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * LCD VSS pin to ground
 * LCD VCC pin to 5V
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe
 modified 22 Nov 2010
 by Tom Igoe
 modified 7 Nov 2016
 by Arturo Guadalupi

 This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/LiquidCrystalHelloWorld

*/

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

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 10, d6 = 9, d7 = 8;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis() / 1000);
}

show your schematic

Maybe buy an I2C LCD, as there is additional circuitry that converts the two pin I2C interface to the LCD pins.

i dont really have an schematic because its 3 different boards

i really need to show it tommorow i dont have time to go buy :pensive:

i mean 3 circuits :sweat_smile:

LCD uses 6 digital pins, Uno have 18, what is the problem?

Which microcontroller are you using?

i tried this websie

which said connect the digital pins to 4,5 and others but when I try to connect it to 12 11 10 8 9 it doesn't work Idk why :sweat: :persevere:

as i said , arduino uno

Analog pins A0 through A5 are Digital pins 14 through 19 (A0 = D14, A1 = D15...).

If you change hardware pins, you must change your sketch to use the same pins.

thanks!,but i changed the script for the pin 12 11 10 9 8 in this line
const int rs = 12, en = 11, d4 = 5, d5 = 10, d6 = 9, d7 = 8;
still doesn't work , I'm a beginner so I just don't know these stuff
I want to just use the 11 10 9 8 pins as 5 4 3 2 pins

does it depend on the ~ sign?
the ~ sign on the digital pins?

Show an accurate drawing of your project. (pencil and paper, chalk and slate, coal and a shovel, MSpaint... et c.)

The ~ sign means the pin is PWM... I am not sure I understand your question.

Shouldn't affect anything in this case.

ok i will draw it on a cad and I will take screenshot

i didnt use a resistor for one of the vcc, is that the problem?

Drawing.

Not sure, drawing / schematic of your current wiring would help.

chrome_hjFAIuWcz9