When I upload the code, i got this problem. How can i fix it?
C:\Users\Kevin\Documents\Arduino\libraries\Ada_HT1632_master\glcdfont.c:15:23: error: variable 'font' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
static unsigned char font[] PROGMEM = {
LED Matrix
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: LED Matrix
That is a known issue with the most recent IDE. See the second question here: https://github.com/arduino/Arduino/wiki ... -Questions
You will need to edit the library to add the 'const' as described in the FAQ
You will need to edit the library to add the 'const' as described in the FAQ
- curtis_r
- Posts: 7
- Joined: Fri Dec 04, 2015 7:21 pm
Re: LED Matrix
Just received my 16x24 LED display & am trying the basic demo. I've tried the GitHub suggestion, namely changing in glcdfont.c
static unsigned char font[] PROGMEM = {
to
const font[] PROGMEM = {
but it then produces a new error:
warning: type defaults to 'int' in declaration of 'font'
Arduino Uno, software v1.6.6
edit: had also tried const char font[] PROGMEM = {
static unsigned char font[] PROGMEM = {
to
const font[] PROGMEM = {
but it then produces a new error:
warning: type defaults to 'int' in declaration of 'font'
Arduino Uno, software v1.6.6
edit: had also tried const char font[] PROGMEM = {
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: LED Matrix
Code: Select all
static const unsigned char font[] PROGMEM = {
- curtis_r
- Posts: 7
- Joined: Fri Dec 04, 2015 7:21 pm
Re: LED Matrix
That did it! Obviously I'm new to C++ coding (and really haven't coded anything in ages). Thanks a ton.
- curtis_r
- Posts: 7
- Joined: Fri Dec 04, 2015 7:21 pm
Re: LED Matrix
Ok, now that I have the examples working, I think I might have a defective LED panel. I've tried a few 'examples' with the same dead LEDs.
- Attachments
-
- 20151204_220123.jpg (517.49 KiB) Viewed 602 times
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: LED Matrix
Yes, that looks like you have a couple of dead sections there. It is an SPI interface, so it is not a wiring problem on your end. If you contact [email protected] with a link to this thread we can send a replacement.
- Joeyherbst
- Posts: 5
- Joined: Thu Jan 21, 2016 7:24 pm
Re: LED Matrix
How do I find the line of code in the library to change it?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: LED Matrix
What are you trying to change?How do I find the line of code in the library to change it?
- Joeyherbst
- Posts: 5
- Joined: Thu Jan 21, 2016 7:24 pm
Re: LED Matrix
char font[] PROGMEM = {
To whatever it needs to be
To whatever it needs to be
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
- Joeyherbst
- Posts: 5
- Joined: Thu Jan 21, 2016 7:24 pm
Re: LED Matrix
Alright so I found it and I changed it and now it is not letting me save the changed wordpad doc. How do I save it once it's changed? It is giving me the error: 'This file is a read only file.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: LED Matrix
right-click on the file in explorer and un-check the read-only box.
- Joeyherbst
- Posts: 5
- Joined: Thu Jan 21, 2016 7:24 pm
Re: LED Matrix
Alright so I changed and saved the file and now i can verify it fine but when I upload it it uploads fine but nothing happens.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: LED Matrix
Please post some photos showing your soldering and connections between the Arduino and display.
Please be positive and constructive with your questions and comments.