Go Down

Topic: Code Template (Read 609 times) previous topic - next topic

gregorss

Apr 15, 2019, 06:45 pm Last Edit: Apr 15, 2019, 06:50 pm by gregorss
Hi there!

Since I have my special ways of writing code I made me a template. See attachment. I think everyone should be able to have his/her own code template (to be opened automatically when starting a new sketch).

What do you think?

Regards,

Gregor
„Ich glaube, ich leg' mich noch mal hin", sagte das Bit.

AWOL

Does your special way always include misspellings and missing return types?

gregorss

#2
Apr 15, 2019, 08:57 pm Last Edit: Apr 15, 2019, 09:02 pm by gregorss
Does your special way always include misspellings and missing return types?
These are mistakes I never do :-)

Regards,

Gregor

Okay ... here you are ...

Code: [Select]
// Name des Sketches

//-------|---------|---------|---------|---------|---------|---------|---------|

void setup()
{
}

void loop()
{
}
„Ich glaube, ich leg' mich noch mal hin", sagte das Bit.

pert

I think everyone should be able to have his/her own code template (to be opened automatically when starting a new sketch).
The code that's added when you open a new sketch is from {Arduino IDE installation folder}/examples/01.Basics/BareMinimum. You can edit that file to whatever your preference is for new sketches. The Arduino IDE doesn't allow you to save example sketches so you'd need to do it using a regular text editor. The only problem is that, since the BareMinimum file is saved in the Arduino IDE installation folder, you need to redo this every time you update to a new version of the Arduino IDE. So you might want to save your template somewhere safe so it's quick and easy to copy it over to BareMinimum after updating the IDE.

Juraj

you could create a library with examples only

gregorss

The code that's added when you open a new sketch is from {Arduino IDE installation folder}/examples/01.Basics/BareMinimum. ...
Great! Thanks!

Gregor
„Ich glaube, ich leg' mich noch mal hin", sagte das Bit.

pert

You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per

Go Up