JemRF / max7219

A library for the MAX7219 7 segment 8 digit display with decimals
34 stars 16 forks source link

warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] #4

Open Bocuma747 opened 3 years ago

Bocuma747 commented 3 years ago

When running your example HelloWorld.ino on version 2 of this library, nothing displays on my 7 segment display, and I get the following error:

E:\Documents\Arduino\7segtest2\7segtest2.ino: In function 'void loop()':
E:\Documents\Arduino\7segtest2\7segtest2.ino:15:37: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   max7219.DisplayText("HELLO", RIGHT);
                                     ^
E:\Documents\Arduino\7segtest2\7segtest2.ino:20:36: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   max7219.DisplayText("HELLO", LEFT);
                                    ^
E:\Documents\Arduino\7segtest2\7segtest2.ino:25:38: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   max7219.DisplayText("87.56F", RIGHT);
                                      ^
E:\Documents\Arduino\7segtest2\7segtest2.ino:30:37: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   max7219.DisplayText("87.56F", LEFT);
                                     ^
Bocuma747 commented 3 years ago

Woops, I had to change the pins in max7219.cpp for my specific board, now it shows up on the 7 segment display. I'm still getting that same warning, though.

JemRF commented 3 years ago

Thanks, we will look into this. What board are you using?