Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ardunio Sketches. #14

Closed
IdrisTheDragon opened this issue Oct 23, 2018 · 2 comments
Closed

Ardunio Sketches. #14

IdrisTheDragon opened this issue Oct 23, 2018 · 2 comments

Comments

@IdrisTheDragon
Copy link

Hey, I don't know if you already know this trick but you should consider using multiple files for one sketch instead of having everything in one bloated source file. The Arduino IDE makes this very easy:

  1. Click the new tab button and name it however you want. It will create a second .ino file next to your original in the sketch directory, and open a new tab in the IDE.

  2. Move your functions into the other files it creates, these functions are accessible in the main sketch file the same as if they where in the main file, no complex imports needed.

  3. Save hours of scrolling through the big file when you could just switch tabs to find the function/bit of code you want.

It's not very well documented online, but it is sooo useful for code organisation.

p.s. please start using git properly... you could add tags to mark the code commit for each episode. Then note this down in the README for non git users to understand, much nicer than partX folders...

@IdrisTheDragon
Copy link
Author

Also https://create.arduino.cc/editor apparently this is a thing.

@XRobots
Copy link
Owner

XRobots commented Oct 23, 2018

Thanks for that. After Part 13 all the Arduinos are getting upgraded, so it'll be time for a code restructure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants