LCD RGB backlight problems

Stumped on problem with getting the Grove 16x2 LCD RGB backlight to work properly, in short:

  • It works fine when controlled by the Ardino IDE my PC
  • But not by the Ardino IDE on my student's PC

In some more detail:

  • Both of us uses the same Arduino boards with the Grove backboard, and the LCD connected to an I2C connection (... several tested, with identical results)
  • Both uses the same software: Arduino IDE 2.3.4, the same LCD RGB Backlight library v1.02, and the same C code - the HelloWorld example from the library.
  • FWIW, we use different PCs, I have a HP Probook, my student uses a Lenovo Thinkpad, I cannot see why this would make a difference, and my student have encountered no problems using his PC with the Arduino before.
  • When my student just connects and runs the example nothing happens
  • When I run the example the backlight lights up and the text appears as expected, ("HelloWorld", and a counter counting the seconds).
      • NB, may be important - if I disconnect and reconnect the Arduino - the backlight and text still shows - the second counter resets so the program seems to be restarting, but still seems to be uploaded to the Arduino.
      • If we now connect the Arduino to the student PC, again the backlight and text shows
      • And *now" the student PC is able to run the example - when we change the text or backlight color we verify that it is indeed the student PCs IDE that is now uploading and running the example.
    • However, if we now disconnect and reconnect the Arduino - the backlight and text does not show - - and now the Student PC is not able to run the example
    • And connecting back to my PC - the text and backlight does not show - but from my PC we are able to run the HelloWorld example.

Has anyone encountered anything similar, have ideas for where to look for solutions?

I think it is probable that your code is doing some initialisation that the student code is not doing. Therefore, when the student runs code after yours, it works. When the student runs after a power cycle, it doesn't.

Therefore logic suggests there is some difference between your code and the student. In theory, you should be producing an identical .hex file, which you could compare the sizes of by looking at the temporary sketch folder.

Comparing the compilation output might also reveal different versions of libraries used, for example.

Which Arduino?
When you say same do you mean the exact same board or two different boards of the same type?

I don't know how "new" 2016 is, but Grove says 2016 is "new" and has "new compatibility"

Item	Value
Input Voltage	5V
Operating Current	<60mA
CGROM	10880 bit
CGRAM	64x8 bit
LCD I2C Address	0X3E
RGB I2C Address	0X62
note

There are 4 I2C addresses and we use 2 I2C addresses for LCD and RGB.

Show some identifying information about your two configurations... code... physical setup... the usual.

Thanks so far, people
*Bob

  • Yes, I have checked the verbose compilation output and looked equal
  • But I havent checked the hex files - found out where they reside, and can get hold of my student's to check
  • In the meantime I get to loan another student PC to see if i can recreate the problem myself and check from there, will update...
  • Jim
  • Yes, exact same - ie we tried the test both with separate equal boards - but also with the whole test using the exact same board/LCD. No difference
  • xfpd
  • And I will update with the compilation info, and whether the hex files are indeed different.

Will probably not update before friday/weekend - again, thx so far!

Stein

Have finally got the time to investigate further, and in short I have come up short :-(
This means that I am giving up on investigating further, but FWIW here are the results of the final investigations, and enclosed sample files, logs and hex files.

I did/found:

  • I recreated same behaviour on a new PC - similar to my Students - ie:
    • The example "HelloWorld" compiled on my new PC still works
    • And the example compiled on my Student's PC doesn't
  • and this is independent of whether the resuting hex files are run on my or my students PC, and independent on which board/LCD used - eg I can run "my" hex file on my PC and it works, and "my student's" hex file on same PC, same board afterwards, and it fails as described.

I checked the log outputs (enclosed),

  • For all I can see they are virtually identical save for different directory structure on the two machines
  • Most important seems that the same libraries/versions are used

Also the hex files are enclosed - they are slightly different, but I cannot parse those,

  • Both are compiled from the included "HelloWorld" example.

Again thanks for yout input, sorry that I couldn't isolate the problem.
Students.ino.hex (10.0 . KB)
students-log-output.txt (12.0 . KB)
Teachers.ino.hex (10.0 . KB)
teachers-log-output.txt (12.8 . KB)

They are slightly different, that is true. However as I am sure you know, it only takes 1 byte to make a significant difference.

Looking at the disassembly, there are different instructions, which should not be the case if compiled from identical source. So we can conclude the source files do indeed differ.

Although the library versions be may the same, the code could still be different, possibly the code was edited post-download, but for other reasons as well.

I don't think there is a particularly easy way to compare the source used for the compile, since it is spread around the file system, but you could parse out the file names from the verbose output. However, I would start by looking at the library "Grove - LCD RGB Backlight"

Thanks for your time.
And something on my students' PC is indeed different, but reinstalling libs and Arduino IDE has not helped, and the verbose output gives me no clue, so unless I have an Aha moment we are proceeding with other parts of the Grove kit

It's the only variable left and it could make a difference depend on how Lenovo implemented USB

... after this I changed my Job PC to another Lenovo, but same result.
Compiled on my new machine the resulting hex file works OK on my PC or my students, and on both our Arduino boards.
And the version compiled on my student's PC doesnt, on neither PC, on neither board.
So I dont think the issue is with the USB connections - even if the Lenovos also may differ.

But the configuration must be different somehow, but we run the same Arduino IDE, same libraries, same versions reported, and same source code. And the hex file winds up different.

Thanks for the input.

Stein

Sound like you tried everything humanly (even super humanly) possible.

  1. compile a single line sketch and compare
  2. add calls to the wire library, and compare
  3. add calls to the rgb library, then compare

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.