I’m having issues with my 16X2 LCD only showing squares instead of the text I have it saying.
The code I am using is:
#include <Servo.h>
#include <LiquidCrystal.h>
int pos = 0;
const int Y_pin = 1; // analog pin connected to Y output
Servo myservo;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
myservo.attach(6);
lcd.begin(16, 2);
lcd.print("Servo Controll");
}
void loop() {
// put your main code here, to run repeatedly:
Serial.print("Y-axis: ");
Serial.print(analogRead(Y_pin));
Serial.print("\n");
delay(100);
lcd.setCursor(0, 1);
lcd.print("Y Pos: ");
}
I wired the LCD With the folowing connections:
(format of wiring: Arduino pin to LCD pin)D7 to RS, D8 to E, D9 to D4, D10 to D5, D11 to D6, D12 to D7, VCC(5V) to A/ VDD, GND to VSS/ RW/ K, V0 to a 10K potentometer.
Did I wire it up wrong?
(Yes I know that I am usind the sereal monitor)
(The code is in development)
servocontroll.ino (604 Bytes)