• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

What are these symbols appearing?

Q&A Forum › What are these symbols appearing?
0 Vote Up Vote Down
Paul French asked 4 years ago
11 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
Can you complete your question?
Regards,
Sara

0 Vote Up Vote Down
Paul French answered 4 years ago

Hi Sara, not sure why my answer was truncated.
Here is a image from my LCD display, there you can see strange characters after the word “OFF”

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi again.
Can you show me the lines of code that display that message?
Regards,
Sara

0 Vote Up Vote Down
Paul French answered 4 years ago

Hi Sara,
 
Here is the code:-

Start your code here

// set cursor to first column, first row
  lcd.setCursor(0, 0);
  // print message
  lcd.print(“State:- “);
  lcd.println(messages[systemState]);
  
  delay(1000);
  // clears the display to print new message
  lcd.clear();
  // set cursor to first column, second row
  lcd.setCursor(0,1);
  lcd.print(“CurrWt:- “);
  lcd.print(currentWeight);

Many thanks
 
 
Paul

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Can you show me the definition of the messages variable?
Try creating an auxiliary String variable with the message you want to display, and then display that variable instead of “messages[systemState]”.
Regards,
Sara

0 Vote Up Vote Down
Paul French answered 4 years ago

Sara,
Thank you for your assistance.  Here is the code:-

Start your code here

enum _state_enum
{
  START,
  FILLING,
  EMPTYING,
  STEEP1,
  REST1,
  STEEP2,
  REST2,
  STEEP3,
  REST3,
  OFF,
  };
_state_enum systemState = START;

// convert State Enu into Char for Serial print
const char * messages[] = {
  “START”,
  “FILLING”,
  “EMPTYING”,
  “STEEP1”,
  “REST1”,
  “STEEP2”,
  “REST2”,
  “STEEP3”,
  “REST3”,
  “OFF”
 };

 

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Can you try it like this:

String messageToPrint = messages[systemState];
lcd.println(messageToPrint);

Instead of:

lcd.println(messages[systemState]);

I know this might seem the same thing, but sometimes this solves that kind of issue.
Regards,
Sara

0 Vote Up Vote Down
Paul French answered 4 years ago

Thank you Sara – yes I will try this.

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Great.
Then, let me know the result.

0 Vote Up Vote Down
Steve Mercer answered 4 years ago

It kinda looks like a problem I had when working with Microchip PIC and 2 x 16 displays. It turned out that the display buffer would still contain some artifacts. The fix at the time was to write the complete line with extra spaces if needed.

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Thanks for the suggestion, Steve.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.