[SOLVED]Port Library for Grove LCD RGB Backlight display


#1

Happy Holidays to all,

For Christmas I received a grove LCD RGB Backlit display. http://www.seeedstudio.com/wiki/Grove_-_LCD_RGB_Backlight#Download_Code_and_Upload

I have found that the library will compile when replacing Wire,h and Print.h with application.h.

However when I flash, nothing happens on the LCD, and the light on the photon goes to steady Cyan. The only way to flash after that is to put it into DFU Mode.

Can anyone offer some help to either porting this library or steering me in the right direction?

Thank you!


#2

Since I can’t make out if there are any on the board, try adding external pull-up resistors to the I2C lines.

And make sure your code is not blocking, which would prevent OTA flashing and other cloud features.

If you are running a Photon you can put it into Safe Mode to flash OTA without the need for DFU.


#3

I have 1kohm resistors for pull-up on each i2C line.

I dont believe my code would be blocking as it is just example from the library.

Anything else?


#4

You are using the library from the linked page? in the rgb_lcd.cpp file you will need to remove all headers (particle includes them if required) and replace with application.h,

/*
#include <Arduino.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <Wire.h>
*/
#include "application.h"

#include "rgb_lcd.h"

in the rgb_lcd.h you can remove both includes

as a test try this example with the #include <Wire.h> removed

there was a bug with 0.4.7 where the device would lock up if the resistors were not present on i2c, maybe try going back to an older version just to test, maybe 0.4.6.

let us know how you get on


#5

Okay thanks! I’m just out so I’ll try when I arrive back,
Thanks!


#6

Okay!

So I am partly successful.
I have removed the appropriate includes and applied them to the photon with 0.4.6…we have breathing cyan! Yay!

However the screen just displays:

Those faint grey boxes disappear when the photon is off.

So after racking my brain I don’t know where to go now…


#7

@Thewierd1, you may need to add pull-up resistors on the SDA and SCL lines. I recommend 4.7K ohm resistors to the +5 or Vin line from which you power the LCD module. :grinning:


#8

Well I tried your suggestion @peekay123. I dont quite have 4.7k, Just 4k ohm however to no such luck. Just get the same results as the previous image posted.
Could it be an addressing issue with I2C?


#9

Soo!


I had messed with the addresses and they werent default! Changed back to original after adding pull up resistors and voila!

I thought it wasnt going to work!
Thank you all, this is one of the most responsive forums out there!

Have a happy new year!


#10

Greetings:

I was following the post above. I have a Grove RGB I2C LCD display that I wish to connect to a Photon. But I didn’t see where the the SCL and the SDA pins from the LCD connect to the photon?
Can someone help to help me understand how to hook up the LCD.
Do I really need to connect pull-up resistors to make it work?
Any help would be appreciated
thanks
Tom


#11

@Geotek50, here is how you need to connect the grove to your Photon:

Grove    Photon
 Wire     Pin 
----------------
Black     GND
Red       Vin (this is 5v USB power)
White     D0 (SDA)
Yellow    D1 (SCL)

You WILL need 4.7K or 10K pulllup resistors for both SDA and SCL lines. You will need to pullup to Vin (5v). You can try without the resistors to begin as it is unclear if there are pullups on the Grove board already. :grinning:


#12

I guess I don’t understand how the firmware knows that D0 ->SDA and D1 -> SCL


#13

It’s baked into the firmware that runs behind your code.


#14

Can you modify that part, or do you just have to resign to the fact that D0 and D1 will be the chosen pins. Either way, it will take up two I/O pins, I’m just wondering in case I have to modify it.


#15

How did you get that to work i have been trying to do mine but its not displaying anything


#16

Have you actually read the thread?