Go Down

Topic: Code Template (Read 423 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
Bei Vollmond ist Neuerde.

AWOL

Does your special way always include misspellings and missing return types?
"Pete, it's a fool (who) looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

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()
{
}
Bei Vollmond ist Neuerde.

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
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

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
Bei Vollmond ist Neuerde.

pert

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

Go Up