Controlling 16x32 Panel using Teensy 3.1

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rben13
 
Posts: 74
Joined: Mon May 23, 2011 3:36 pm

Controlling 16x32 Panel using Teensy 3.1

Post by rben13 »

I'm wondering if anyone has gotten the example code to run correctly on a Teensy 3.1 when interfaced with the 16x32 Medium LED Panel.
When I try to run the test_colors example, I get a number of errors which I've copied below. I would really appreciate help getting this working correctly. It's
meant to be part of a robot being built for the FRC, FIRST Robotics Competition. (usfirst.org)

Thanks,
Ray

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.5 (Windows NT (unknown)), Board: "Teensy 3.1"
In file included from H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:37:0:
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\gamma.h:6:36: error: 'const uint8_t gamma []' redeclared as different kind of symbol
In file included from H:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy3/WProgram.h:6:0,
from H:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy3/Arduino.h:1,
from H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.h:2,
from H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:36:
h:\program files (x86)\arduino\hardware\tools\arm-none-eabi\bin\../lib/gcc/arm-none-eabi/4.7.2/include-fixed/math.h:287:15: error: previous declaration of 'double gamma(double)'
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp: In member function 'void RGBmatrixPanel::begin()':
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:176:3: error: 'TCCR1A' was not declared in this scope
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:176:13: error: 'WGM11' was not declared in this scope
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:177:3: error: 'TCCR1B' was not declared in this scope
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:177:13: error: 'WGM13' was not declared in this scope
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:177:26: error: 'WGM12' was not declared in this scope
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:177:39: error: 'CS10' was not declared in this scope
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:178:3: error: 'ICR1' was not declared in this scope
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:179:3: error: 'TIMSK1' was not declared in this scope
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:179:13: error: 'TOIE1' was not declared in this scope
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp: At global scope:
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:402:4: error: expected constructor, destructor, or type conversion before '(' token
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp: In member function 'void RGBmatrixPanel::updateDisplay()':
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:505:3: error: 'ICR1' was not declared in this scope
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:506:3: error: 'TCNT1' was not declared in this scope
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:518:10: error: cannot convert 'PORTBemulation' to 'uint8_t {aka unsigned char}' in assignment
H:\Program Files (x86)\Arduino\libraries\RGBmatrixPanel\RGBmatrixPanel.cpp:537:5: error: '_SFR_IO_ADDR' was not declared in this scope

User avatar
michaelmeissner
 
Posts: 1830
Joined: Wed Aug 29, 2012 12:40 am

Re: Controlling 16x32 Panel using Teensy 3.1

Post by michaelmeissner »

Unfortunately the Adafruit code is specific to AVR processors, accessing direct port registers to speed up the I/O and using inline assembly statements. The Teensy 3.0 uses an Arm processor, which is completely different. There is some emulation of the port registers in the Teensy implementation that helps in some cases, but it won't help in this case. You will either need to rewrite the Adafruit code to use standard digitalWrite, etc. for non-AVR processors, or you will need to use an Uno to run the display. Going by comments in the code, the Mega is untested, and the Leonardo is a work in progress, so the Uno (and compatibles) is the only processor that seems supported at the time.

User avatar
rben13
 
Posts: 74
Joined: Mon May 23, 2011 3:36 pm

Re: Controlling 16x32 Panel using Teensy 3.1

Post by rben13 »

Thanks for the information. Since the Teensy 3.1 runs at 72MHz, I'll try rewriting using the standard digitalWrite and see if that works. Keep you fingers crossed for me.

User avatar
michaelmeissner
 
Posts: 1830
Joined: Wed Aug 29, 2012 12:40 am

Re: Controlling 16x32 Panel using Teensy 3.1

Post by michaelmeissner »

There are 2-3 threads about using the 16x32 on Teensy's. Over at the pjrc forum. somebody mentioned he was starting a similar effort. You might want to touch base with him/her: http://forum.pjrc.com/threads/24814-Tee ... x-Ethernet

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”