Community
cancel
Showing results for 
Search instead for 
Did you mean: 
MSoli2
Novice
1,574 Views

Connecting RGB LED matrix to Edison

Hi, I have two RGB Matrix 16x32 and I want to connect then to Edison, How would I? (Hardware wiring / Software Libraries)?

Thanks

5 Replies
Diego_V_Intel
Employee
79 Views

Hello M-Soliman,

 

If you are using the Arduino Expansion Board I recommend you to take a look at the following tutorials:

There is a library to use the matrix in the tutorials above, but it is Arduino UNO compatible only. Anyhow, if you understand how the matrix works by reading the tutorials above I'm sure you could check the library provided and write a new one based on it to be used with Edison.

I hope you find this information useful.

Regards,

Diego.

MSoli2
Novice
79 Views

Hi Diego,

Thank you so much for your help, I'm using the mini breakout, will it work?

Thank you again,

Diego_V_Intel
Employee
79 Views

Hi M-Soliman,

The implementation would be different because it's a different board but the principles are the same. If you use the Mini-Breakout Board you will need to use a logic level converter because the Edison's IOs use 1.8V logic while the LED matrix uses 5V. Besides the logic level translator the wiring would be similar, however the Mini-Breakout Board has another footprint so you would have to choose which IOs to use in order to interface the LED matrix. I recommend you to check the Hardware Guide of the Mini-Breakout Board to know which pins you can use: http://www.intel.com/content/www/us/en/support/boards-and-kits/000005574.html Intel® Edison Breakout Board Hardware Guide for Boards and Kits

The programming part would be the same. I recommend you to full understand how the matrix works and check the Arduino library provided for the matrix. Based on that library you can program your own code to use the matrix. You have different options: Python, JavaScript, C/C++. The MRAA library might be useful to control the GPIOs of the Mini-Breakout Board. Check the following sites for additional details about the MRAA library with the Mini-Breakout Board:

Regards,

Diego.

MSoli2
Novice
79 Views

Hi Diego,

I'm sorry I didn't reply you earlier, as I was trying to order the bi-logic converter, but, I got Arduino breakout board and I have managed to go through the links that you posted,

but, the Arduino code won't run it gives me errors in Intel's code as below

Arduino: 1.6.5 (Mac OS X), Board: "Intel® Edison"

In file included from /Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/variants/edison_fab_c/variant.h:27:0,

from /Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/Arduino.h:33,

from /Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.h:2,

from /Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp:36:

/Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp: In member function 'void RGBmatrixPanel::init(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, boolean, uint8_t)':

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:132:56: error: 'PinDescription' has no member named 'ulPin'

# define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )

^

/Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp:112:15: note: in expansion of macro 'digitalPinToBitMask'

sclkpin = digitalPinToBitMask(sclk);

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:131:53: error: 'PinDescription' has no member named 'pPort'

# define digitalPinToPort(P) ( g_APinDescription[P].pPort )

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:134:38: note: in definition of macro 'portOutputRegister'

# define portOutputRegister(port) ( &(port->PIO_ODSR) )

^

/Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp:113:34: note: in expansion of macro 'digitalPinToPort'

latport = portOutputRegister(digitalPinToPort(latch));

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:132:56: error: 'PinDescription' has no member named 'ulPin'

# define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )

^

/Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp:114:15: note: in expansion of macro 'digitalPinToBitMask'

latpin = digitalPinToBitMask(latch);

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:131:53: error: 'PinDescription' has no member named 'pPort'

# define digitalPinToPort(P) ( g_APinDescription[P].pPort )

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:134:38: note: in definition of macro 'portOutputRegister'

# define portOutputRegister(port) ( &(port->PIO_ODSR) )

^

/Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp:115:34: note: in expansion of macro 'digitalPinToPort'

oeport = portOutputRegister(digitalPinToPort(oe));

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:132:56: error: 'PinDescription' has no member named 'ulPin'

# define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )

^

/Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp:116:15: note: in expansion of macro 'digitalPinToBitMask'

oepin = digitalPinToBitMask(oe);

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:131:53: error: 'PinDescription' has no member named 'pPort'

# define digitalPinToPort(P) ( g_APinDescription[P].pPort )

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:134:38: note: in definition of macro 'portOutputRegister'

# define portOutputRegister(port) ( &(port->PIO_ODSR) )

^

/Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp:117:34: note: in expansion of macro 'digitalPinToPort'

addraport = portOutputRegister(digitalPinToPort(a));

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:132:56: error: 'PinDescription' has no member named 'ulPin'

# define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )

^

/Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp:118:15: note: in expansion of macro 'digitalPinToBitMask'

addrapin = digitalPinToBitMask(a);

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:131:53: error: 'PinDescription' has no member named 'pPort'

# define digitalPinToPort(P) ( g_APinDescription[P].pPort )

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:134:38: note: in definition of macro 'portOutputRegister'

# define portOutputRegister(port) ( &(port->PIO_ODSR) )

^

/Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp:119:34: note: in expansion of macro 'digitalPinToPort'

addrbport = portOutputRegister(digitalPinToPort(b));

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:132:56: error: 'PinDescription' has no member named 'ulPin'

# define digitalPinToBitMask(P) ( g_APinDescription[P].ulPin )

^

/Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp:120:15: note: in expansion of macro 'digitalPinToBitMask'

addrbpin = digitalPinToBitMask(b);

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:131:53: error: 'PinDescription' has no member named 'pPort'

# define digitalPinToPort(P) ( g_APinDescription[P].pPort )

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:134:38: note: in definition of macro 'portOutputRegister'

# define portOutputRegister(port) ( &(port->PIO_ODSR) )

^

/Users/MAG/Documents/Arduino/libraries/RGB-matrix-Panel/RGBmatrixPanel.cpp:121:34: note: in expansion of macro 'digitalPinToPort'

addrcport = portOutputRegister(digitalPinToPort(c));

^

/Users/MAG/Library/Arduino15/packages/Intel/hardware/i686/1.6.2+1.0/cores/arduino/wiring_digital.h:132:56: error: 'PinDescription' has no member named 'ulPin'

# define digitalPinToBitMask(P) ( g_APinDescription[P]....

Diego_V_Intel
Employee
79 Views

Hi M-Soliman,

The errors above are due to architecture differences. The code is based on the AVR architecture. Since the Edison has a different architecture there are registers that don't exist so the code won't compile.

I'd recommend you to re-write the code. I know that it represents a huge effort but I'm afraid there isn't another way. You could search for another library that is Edison compatible but I'm not sure if there is such library and it might take more time looking for the library than re-writing the Arduino one.

I'd suggest you to try to write a new library, that way you will learn a lot about how a RGB LED matrix works and if you use the Arduino library as a reference maybe it won't be that hard.

Regards,

Diego

Reply