Help with error message when compiling osPID stripboard code

Hi Everyone

I am attempting to implement a stipboard based PID temperature controller as detailed by Tom on his Magic Smoke blog. Details of the project are here. The Github repository is here.

This project is based on the osPID controller and firmware by Brett Beauregard and Rocket Scream, but the code has been changed to reflect the simplified hardware.

My issue is that when I go to compile the sketch osPID_Firmware.ino I get the following error message:

osPID_Engine.cpp:45: error: variable 'tuningRule' must be const in order to be put into read-only section by means of 'attribute((progmem))'

PROGMEM Tuning tuningRule[PID::NO_OVERSHOOT_PID + 1] =

The IDE version I am using is 1.6.12 and the target board is an Uno R3.

Does anyone have any idea what the issue could be or how I could resolve it?

As an aside. When I wasn't able to make any progress last night, I tried loading a pre-compiled version of this code osPID_Firmware.cpp.hex (celsius version found in pre-compiled folder on Github repository) using avrdude thinking that might be a workaround. It came pretty close to working, but failed when verifying with a mismatch at byte 0x7800. I have attached a screen shot of the avrdude screen.

As a fairly inexperienced arduino user, I would really appreciate any input people might have time to give...

Kind regards

Dan

Does anyone have any idea what the issue could be

Sure. Even you should. The compiler told you exactly what the problem is. Variables must be declared const in order to be put in PROGMEM. Is your variable const? No, it is not.

how I could resolve it?

Maybe you could add the const keyword to the variable declaration.

I have attached a screen shot of the avrdude screen.

That will be the last time you attach a bloated picture of text!

@ Paul S. Actually I was hoping someone could help me rather than shoot me down in flames...

FYI This was not code that I wrote - but is one of the first arduino projects I have attempted.

My apologies for my 79kb of "bloat" - I was simply trying to provide as much information as possible as per the wiki at the top of this forum category.

Actually I was hoping someone could help me

Was there some part of "add const as part of the variable declaration" that you did not find helpful?