Close

Code Restructuring

A project log for WEEDINATOR 2019

The WEEDINATOR project continues .... The inevitability of robots working on farms draws ever nearer ....

capt-flatus-oflahertyCapt. Flatus O'Flaherty ☠ 08/20/2018 at 18:080 Comments

Occasionally things get so messy that a tidy up simply can no longer be avoided. So it is true with writing code and having all the code located in one tab makes it difficult to find bits that need tweeking. The Arduino IDE allows code to be split over many different tabs, or columns, as below:

The trick to do this is to use the 'extern' function to make integers etc global and not just restricted to the code in the tab. And here is an animation to show how it is used:

The full set of code files are updated regularly on GitHub HERE.

Discussions