Hi I want to lock part of my program so that I can not accidently change something when making adjustments on speeds and load cells
OK.
Split your project into multiple files. Put the most-commonly adjusted constants into one of them.
Edit: keep backups of everything or use a source-control system.
AWOL:
OK.
That's very accommodating of you. :
I almost choked
darrob:
That's very accommodating of you. :
I almost choked
Well, I didn't really know what else to write.
If you go with MorganS's solution, but want to go a step farther and make it impossible to edit those files in the Arduino IDE, you can structure them as a library and put them under the src subfolder of the sketch. The Arduino IDE only opens the files in the root of the sketch folder so you can use the files in the src folder from your sketch but you won't be able to edit them via the IDE.
What if you mark the related files read-only?
Or keep them in a read-only directory?
sheepherder:
Hi I want to lock part of my program so that I can not accidently change something when making adjustments on speeds and load cells
Do you mean changes while the program is running or changes while you are writing the program?
If you are talking about changes while writing the program then my suggestion is just to make regular back-up copies of your code.
...R
I also follow the policy suggested by Morgans.
In my Arduino\Libraires folder I have a library of my own standard routines, for GPS, Displays, FRAM, LoRa that sort of stuff.
I use them by the normal #include mechanism.
A can still edit them of course, but the dont appear in the Arduino IDE when working on a program.