Project 10 Crystal ball - Characters not showing

I too am having a problem with Project 10: Crystal Ball. I saw the post by @neulad from Dec 9 for the same issue. That problem was a result of soldering between DB4 and DB5. I've checked the points on my lcd board and I don't see the same issue.

I've changed the wiring several times and compared it to the book and to an Arduino video to make sure I have the right arrangement. I've also checked the each wire and made sure they're seated securely. The tilt sensor is also seated firmly. Page 89 of the manual shows a bottom view of the sensor, with pins 1 and 2 being for power and pins 3 and 4 for ground, I've tried rotating the sensor around on the breadboard. But that didn't work either.

I removed the tilt sensor, the wires to the power and ground, and its resistor see if that was causing the problem. That didn’t solve the problem so I put those back on the board.

Here's my coding:

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int switchPin = 6;
int switchState = 0;
int prevSwitchState = 0;
int reply;
void setup() {
    lcd.begin(16,2);
    pinMode(switchPin, INPUT);
    lcd.print("Ask the");
    lcd.setCursor (0,1);
    lcd.print("Crystal Ball!");
}

void loop() {
  switchState = digitalRead (switchPin);
  if (switchState != prevSwitchState) {
  if (switchState == LOW) {
  reply = random(8);
  lcd.clear();
  lcd.setCursor (0,0);
  lcd.print("The ball says: ");
  lcd.setCursor(0,1);
  
  switch (reply){
  case 0: 
  lcd.print("Yes");
  break;
        
  case 1:
  lcd.print("Most likely");
  break;
        
  case 2:
  lcd.print("Certainly");
  break;
      
  case 3:
  lcd.print("Outlook good");
  break;
      
  case 4:
  lcd.print("Unsure");
  break;
        
  case 5:
  lcd.print("Ask again");
  break;
        
  case 6:
  lcd.print("Doubtful");
  break;
        
  case 7:
  lcd.print("No");
  break;
    }
   }
  }
  prevSwitchState = switchState;  
}








1 Like

The red arrow points towards the apparent wiper pin.

The green line is the column where it should be.

1 Like

Still doesn’t work.

What problem?

Power is not connected.

Pot pin still in same wrong column.

The power and ground are connected on the other side of the pot pin. From what I understand, that is where they should be.

No USB or power jack, and the ON LED of the UnoR4 is not lit.

And, once you apply power, what is the problem you are experiencing?

Sorry about that. I had disconnected the Arduino from the usb-c cable. I've attached a current picture with with the unit plugged-in this time.

The lcd screen lights-up, but that's all.

You placed the LCD "left" one too many pins. Remove the LCD, examine the last pin. If it is bent, gently, slowly, return it to "straight enough."

[edit] Disregard ... I just counted the pins and sockets in another photo... you have it right. Are the LCD pins pressed into the breadboard all the way?

This is how I attached the LCD screen to the board.

Yes, i just pressed the board in to be sure.

It is perfect. Row 30.

The photo looks like the LCD pins are not pressed into the breadboard. If you pressed the LCD pins in after the photo, apply power and test.

I re-seated the LCD screen just before taking the picture. Those pins are extremely long. I've attached screenshots.

No change in display after reconnecting the board.


I've now told you 3 times that the wiper pin on the pot is in the wrong column.

You still have NOTHING connected to Vo (pin 3 on the LCD) on the breadboard (column 28) .

I give up.

See Post #2

Move the POT.

1 Like

From the pictures it looked like you were talking about moving wires, not the POT. And then I got talking with xfpd. So I wasn’t ignoring you, but I see how it could have looked that way. Sorry for the misunderstanding. You were doing your best to help me. Again my apologies.

The video I watched from Arduino on YouTube shows the POT in a different spot so I didn’t think that was the issue. I’m not home right now but I’ll try it as soon as I get back.

Hello skybear

I think that you have been misled by a poorly drawn connection diagram in the book.

Look at how the potentiometer is drawn:

The two pins on the left hand side are shown connected to rows 26 and 28 on the breadboard.

Now look at the pin on the right hand side of the potentiometer.
It is shown as being on row 28, the same row as the pin on the left.

This drawing does not match the real life potentiometer, whose right hand pin (the wiper) ends up on row 27. This pin needs to be on row 28 to connect to pin 3 of the LCD display.

To get the wiper to be on row 28, the potentiometer needs to be moved downwards on the drawing, so that the left hand pins are on rows 27 and 29. The wires on the left will need altering too.

1 Like

I do not doubt you. YouTube are looking for clicks, not accuracy.

Be sure to follow Post #13 for the "wiper" leg of the potentiometer.

It works! Yay! :smiley: Thanks for the clarification on where the potentiometer needed to go. I forgot that the potentiometer is a transistor and carries current over to the pin on the right side. I also realised I don't understand what each of the pins on the LCD display do, so I need to find some resources on the internet so I read about it.

1 Like

Glad to hear that you have now got it working.