Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display corrupts when a string containing "Mod" is printed #44

Open
per1234 opened this issue Mar 28, 2021 · 8 comments
Open

Display corrupts when a string containing "Mod" is printed #44

per1234 opened this issue Mar 28, 2021 · 8 comments
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Mar 28, 2021

Moved from arduino/Arduino#9887 by @Camo2000

I have found an issue with the LCD display Output, it works fine until you add the word "Mode" as a string. The display then corrupts and I can not see why unless there is a method to control the LED display with text. However if you use any string with the word in it, it still corrupts:-

  • "Mode"
  • "Edit Mode"
  • "Active Mode"

All fail.

String MyTitles[ARRAYSIZE]={"Mode", "Effect", "Pallete", "Sin8", "Sin16", "Speed", "LED Spacing"};
this fails if Mode is in the list

Hope some of you can replicate this.

@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Mar 28, 2021
@per1234
Copy link
Contributor Author

per1234 commented Mar 28, 2021

From per1234 on 2020-03-18:

Please post your full sketch.

@per1234
Copy link
Contributor Author

per1234 commented Mar 28, 2021

From Camo2000 on 2020-03-18

#define ARRAYSIZE 7
String newtit[ARRAYSIZE]={"Apple","Effect","Pallete","Sin8","Sin16","Speed","LED Spacing"};
int iValues[ARRAYSIZE] = {1,2,3,4,5,6,7};
#include <LiquidCrystal.h>
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 7;// initialize the library by associating any needed LCD interface pin
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);// with the arduino pin number it is connected to

void setup() { 
  Serial.begin(9600); 
  lcd.begin(16, 2); // set up the LCD's number of columns and rows:
  lcd.print("Display Active"); // Print a message to the LCD.
  delay(2000);
}
void loop() {
  int iSelection=0;
  lcd.setCursor(0, 1);
  String message =(String)"A" + iValues[iSelection] + " " + newtit[iSelection] + "          ";
  Serial.println(message);
  lcd.print(String(message));
  delay(5000);
}

@per1234
Copy link
Contributor Author

per1234 commented Mar 28, 2021

From Camo2000 on 2020-03-18

just change the word "APPLE" to "Mode" and the LCD will fail or any word in the array once accessed.
use int iSelection=0; to select the array space Apple is 0 but you can put the word Mode anywhere in the array and when accessed it fails.
It also fails on the word "Mod" maybe this is what it is picking out
PLEASE NOTE: the serial.print works fine, it is the lcd.print that fails

@per1234
Copy link
Contributor Author

per1234 commented Mar 28, 2021

From per1234 on 2020-03-18:

Which board are you using?

@per1234
Copy link
Contributor Author

per1234 commented Mar 28, 2021

From Camo2000 on 2020-03-18

it is the standard LCD board 1602A

@per1234
Copy link
Contributor Author

per1234 commented Mar 28, 2021

From per1234 on 2020-03-18:

Which Arduino board. For example: Uno, Leonardo, Mega, MKRZero, Nano 33 IoT...

@per1234
Copy link
Contributor Author

per1234 commented Mar 28, 2021

From Camo2000 on 2020-03-18

Uno R3, but the board seems to be working the LCD only fails if a word containing this sequence "MOD" are sent to the LCD

@per1234
Copy link
Contributor Author

per1234 commented Mar 28, 2021

I was not able to reproduce this issue. It might be specific to one particular variant of the LCD driver.

@per1234 per1234 added the topic: code Related to content of the project itself label Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

1 participant