maly / tm1638-library

Automatically exported from code.google.com/p/tm1638-library
0 stars 1 forks source link

LED Colors are wrong on my board #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. myDisplay.setLED(TM1638_COLOR_GREEN, 7);
2.
3.

What is the expected output? What do you see instead?
LED 7 should become green, it becomes red instead.

What version of the product are you using? On what operating system?

Please provide any additional information below.
I suspect this is just my batch of boards, ref picture. I've added a #ifndef 
section to invert the colours if TM1638_INVERT_LED is set.

#define TM1638_INVERT_LED 1
#include <TM1638.h>

Original issue reported on code.google.com by beikel...@gmail.com on 4 Feb 2013 at 11:41

Attachments:

GoogleCodeExporter commented 9 years ago
The LEDs are fine on my modules, so aparently it's a problem with your batch.

Adding a define to invert the definition would make it impossible to use a 
correct board and an inverted board on the same sketch, which is not good.

I'll try to add a new InvertedLedTM1638 implementations of the TM1638 for 
modules with your LED configuration. That would make it possible to instantiate 
specific modules with inverted LED but maintain compatibility with others too.

I really don't have ANY spare time on my hands right now, as work (real job) is 
killing me... but I'll try to pick this up as soon as I can, I promise.

Original comment by rjbati...@gmail.com on 31 Mar 2013 at 8:13

GoogleCodeExporter commented 9 years ago
Modify the librairy \arduino-1.0.4\libraries\TM1638
on line 31,32,33

#define TM1638_COLOR_NONE   0
#define TM1638_COLOR_RED    2
#define TM1638_COLOR_GREEN  1

Thanks :D

Original comment by webC...@gmail.com on 16 May 2013 at 12:35

GoogleCodeExporter commented 9 years ago
The problem with that solution is: if you have a correct module and an inverted 
module it's impossible to use...

Original comment by rjbati...@gmail.com on 16 May 2013 at 9:18

GoogleCodeExporter commented 9 years ago
Issue 30 has been merged into this issue.

Original comment by rjbati...@gmail.com on 16 May 2013 at 9:19