Go Down

Topic: LCD 16x2 Character by Character, with BUZZ. It's possible? (Read 204 times) previous topic - next topic

JoaquinGallo

Im looking about hours without sucess.. i really want to display text like an RPG game.All i can find its Scroll or blink

I want Letter by letter and with a sound for each..

Exactly like Undertale and others RPG games.

Example
https://www.youtube.com/watch?v=BObcG-AiWt4

Thanks a lot

Rintin

You have to write the characters one by one. Like this:

Code: [Select]

void myPrint(String text) {
  for(int x=0; x < text.length(); x++) {
    Serial.print(text.charAt(x));
    if(text.charAt(x) != 0x20) { // 0x20 -> space
      //tone(3,1);
      delay(800);
    }
  }
  Serial.println("");
}

void setup() {
  Serial.begin(115200);
}

void loop() {
  myPrint(String("This is a test"));
  myPrint("Only a small test");
  delay(10000);
}

JoaquinGallo


Go Up