Seeed-Studio / Grove_LCD_RGB_Backlight

Seeedstudio, Grove - LCD RGB Backlight
MIT License
80 stars 90 forks source link

So Much Problems with Arduino UNO #8

Closed zhangysh1995 closed 7 years ago

zhangysh1995 commented 7 years ago

I got a lot of bugs when compiling the example code "HelloWorld".

Actually it seems the original code is such a mess. Bugs says "Undefined reference to xxx", I couldn't deal with it even after looked at the header file code.

If it is my fault, I will cancel this issue.

ReanimationXP commented 7 years ago

Edit: I thought I had solved this but I was wrong at first. I was getting a lot of references to a missing "Wire.h" file. Turns out since I was using a RedBear Duo for this project (an enhanced clone of the Particle Photon) that means a couple things must be changed in that case. First, all references to Arduino, inttypes, Wire.h, etc need to be commented out both in code and in libraries, and replaced with #include "application.h", which is part of Particle's libraries. To do this:

I navigated to my local copy of https://github.com/Seeed-Studio/Grove_LCD_RGB_Backlight/blob/master/rgb_lcd.cpp and commented out

#include <Arduino.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <Wire.h>

Secondly I navigated to my local copy of https://github.com/Seeed-Studio/Grove_LCD_RGB_Backlight/blob/master/rgb_lcd.h and commented out

#include <inttypes.h>
#include "Print.h"

I also did the same on the example code, https://github.com/Seeed-Studio/Grove_LCD_RGB_Backlight/blob/master/examples/HelloWorld/HelloWorld.ino commenting out //#include <Wire.h>

Lastly I added #include "application.h" to all of these instances in lieu of the original code. This corrected the Hello World example for me and allowed it to compile. Now I have the problem of only getting the backlight to change color, no text is displayed. Never seen this before, but after some researching noticed that this is likely expecting 5v on the positive rail, and the RBLink I'm using with my RedBear Duo is only providing 3v3. Will try 5v and see how it goes.

Update: 5v worked great! Hours of headache over (two) stupid problems.

jsilence commented 7 years ago

The text is displayed when setting the display to one row: lcd.begin(16, 1); But then really only one row is usable. And the contrast of the text is very low. Opening a separate issue for this.

awong1900 commented 7 years ago

I can't found that compiling issue, so close. And feel free to fix it and I'll merge the change.