Comments: Serial Graphic LCD Hookup

Pages

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #524619 / about 11 years ago * / 1

    I know there are probably more sophiscated ways of doing this but..... I assemble an array of data as follows:

    for(i=0;i<GPS_buffsz;i++)
         {
         GPS_buffer[i]=GPS.read();
          }
    

    Which leaves me with an array of ascii (I think).

    Now I want to display some of the data on the LCD...like

    LCD.printStr(GPS_buffer[45]);
    

    What I get on the display is 48 which is the ascii code for 0. What I want to display is the 0. So I suppose I have some kind of types thing going on but think the only choices for the LCD are printStr and printNum. Print num complaims about a conversion to char* which I dont understand yet but may be right way to go about it?

    • Joel_E_B / about 11 years ago / 1

      You'll need to add another function(s) to the library to print other characters. Just copy the printNum function, and modify as needed. If you add some functions that you think should make it into the master, please feel free to make a pull request on GitHub.

  • Member #524619 / about 11 years ago / 1

    Is there a printNum() equlivant for printing unsigned int?

    • Joel_E_B / about 11 years ago / 1

      There is not, but it should be pretty easy to add a function to the library that does what you need. Just copy the printNum function, and modify as needed.

  • Member #524619 / about 11 years ago * / 1

    Trying to compile SerialGraphicLCDDemo but when hit following line :

    LCD LCD;

    get a bunch of errors complaining "LCD was not declared in this scope". Think I installed the libary correctly but who knows?

    • Joel_E_B / about 11 years ago / 1

      Open Arduino. Go to File -> Examples. If the library shows up on this list, you installed the library correctly.

      • Member #524619 / about 11 years ago * / 1

        Did that, which is how I opened SerialgraphicLCDDemo in the first place. But it won't compile .

        • Joel_E_B / about 11 years ago / 1

          Which version of the Arduino IDE are you using?

          • Member #524619 / about 11 years ago / 1

            1.0.5-r2

            • Joel_E_B / about 11 years ago / 1

              There is Arduino 1.0.5 and Arduino 1.5.6r2. I've pulled the latest version of the library from GitHub and tried it on both versions on my Mac. They both compile fine right out of the box. Make sure you don't have any extra folders in your library structure. If you continue to have difficulties, please contact our technical support team for help.

              • Member #524619 / about 11 years ago / 1

                I figured it out. It was where the lib was located, thanks for the clues.

              • Member #524619 / about 11 years ago / 1

                All I know is when i do help/about arduino it says 1.0.5-r2. What should the lib structure be ?


If you've found an issue with this tutorial content, please send us your feedback!