forum protocall
yarisboy
Posts: 245
What is the proper way to post three Spin files that compile with out errors but don't run. I had this working properly but either zapped my breadboard with ESD or made a bunch of code changes that disabled my software. Beginners luck with Spin is frustrating when you don't know what you did right yesterday.
Comments
You should consider revisioning your code. How it works is you number all the files, say:
main_01.spin
graphics_01.spin
other_01.spin
Compile that, and run it.
So, let's say it works, but something needs to be changed in the graphics_01.spin file.
Load main_01.spin, and save as: main_02.spin, after having edited the CON section to read graphics : "graphics_02.spin"
Load graphics_01.spin, and save as graphics_02.spin.
Compile it again, and run it. Should still work.
Now make your changes, safe in the knowledge that the 01.spin set of files is still good.
If you then wanted to change graphics_02.spin, and other_01.spin, your files would look like this:
main_03.spin (because it now points to the two new files)
graphics_03.spin
other_02.spin.
Then edit.
The idea here is that when you are getting ready to mess with some code, you take a look at the tree of files needed. Maybe it's just one file. If that's the case, do a save as with a new number, before your edits, so you always have a recovery point.
If it's a tree of files, decide what it is you want to edit, then go and modify the CON section of the parent files, and do the save as operation to build out the new revision of code, again preserving that recovery point.
After a few times, this will become habit, and you will seriously appreciate it.
Over say, a bunch of revisions, you can go back and examine your train of thought, or re-trace your steps to disaster, branching off to a better direction, with the work you did before.
It's also possible to have the older version file open, and viewable while you complete the changes for the newer version. I do this a lot.
Stan