Tips and ideas for users

While I'm at it:

I found parts of this poster to be a really handy reference. It's too detailed for a single sheet of A4 so I used rasterbator to break it into several and print it at home. I've since realised I don't use all of it, and physically cut it down to a convenient shape and size for my workbench.

This

is the best tip I've found in this thread so far, and it's come to me just as I needed it. Amazing. Thank you! One question about this bit:

This works for me, in that the code becomes collapsable... but then I get an error when I try to compile:

exit status 1
expected unqualified-id before '{' token

image

Can you see what I'm doing wrong please?

Humm, I could swear this worked at one time. :thinking:


  • Better still, use tabs in the IDE to organize your code.

Here, all the global variables have been cut from our sketch and pasted into a new Tab in our sketch (Header.h).

Once they are in the the new Tab, a #include statement is added back in our .ino sketch tab at the top of the code:
#include "Header.h"


Add other Tabs as needed.



What this allows you to do is access your Global variables etc. from anywhere in your main sketch by simply clicking on the Header.h Tab whenever needed.

Can I suggest you open a new thread in Programming to get an answer.
Also post your code in code tags.
To add code please click this link;

Tom... :grinning: :+1: :coffee: :australia:

A curly bracket "}" is not going to be effective if it is in a comment.

That's nice.