Arduino Forum

Using Arduino => Introductory Tutorials => Topic started by: larryd on Apr 12, 2019, 10:53 pm

Title: Newcomers, change the IDE default BareMinimum.ino file.
Post by: larryd on Apr 12, 2019, 10:53 pm
To newcomers.

Save programming time when you start new Arduino projects.
Modify your BareMinimum.ino file which is a template for new programs.
When you use File/New in your IDE, this is the template that is presented.

(http://forum.arduino.cc/index.php?action=dlattach;topic=609744.0;attach=303663)

Attached below is the template I use.  BareMinimum.ino 
(EDIT: I have included SwitchManagerWithFilter.h too, see below.)

When you have decided on a style you like, save it to the directory as see above.


Title: Re: Newcomers, change the IDE default BareMinimum.ino file.
Post by: Power_Broker on Apr 13, 2019, 01:26 am
You are full of amazing tips and tricks  :)
Title: Re: Newcomers, change the IDE default BareMinimum.ino file.
Post by: larryd on Apr 13, 2019, 01:38 am
My wife sometimes says I am full of . . .
Title: Re: Newcomers, change the IDE default BareMinimum.ino file.
Post by: neiklot on Apr 14, 2019, 02:09 pm
Here's mine:

Code: [Select]
//ref
//date

void setup()
{
  Serial.begin(9600);
  Serial.println(".... description ....");
  Serial.print("Created: ");
  Serial.print(__TIME__);
  Serial.print(", ");
  Serial.println(__DATE__);
 
  //turn off L13
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);

} //setup

void loop()
{
 
} //loop
Title: Re: Newcomers, change the IDE default BareMinimum.ino file.
Post by: Erik_Baas on Apr 24, 2019, 12:10 am
There is one problem: Windows won't let you edit any file in that folder (or any other folder in C:\Program Files (x86)). You have to move the file to - for example - C:\Temp, edit it and then move it back! And don't try to start the IDE or create a new project in the mean time, the IDE will crash.
Title: Re: Newcomers, change the IDE default BareMinimum.ino file.
Post by: larryd on Apr 24, 2019, 12:12 am
You can edit the file if you run under administrator privileges.


Title: Re: Newcomers, change the IDE default BareMinimum.ino file.
Post by: Erik_Baas on Apr 24, 2019, 12:21 am
Nope. I could not save it, in spite of being logged in as administrator. (Windows 7/64)
Title: Re: Newcomers, change the IDE default BareMinimum.ino file.
Post by: larryd on Apr 24, 2019, 01:10 am
Windows 10/64 here, works as mentioned.


Title: Re: Newcomers, change the IDE default BareMinimum.ino file.
Post by: dougp on Apr 24, 2019, 05:06 am
Nope. I could not save it, in spite of being logged in as administrator. (Windows 7/64)
I just got it done like this:

Windows assumed

Create new file.  It'll be named sketch<date>
Modify as desired and save it in the user folder and close
Navigate to the user folder and to the folder containing the newly created .ino file
Copy the .ino file.
Navigate to the bare minimum folder as illustrated above
Paste your new custom file to the folder
Rename the existing bareMinimum, I used 'BareMinimum orig'
Rename the new file to BareMinimum
Done

Thanks, larryd!

Title: Re: Newcomers, change the IDE default BareMinimum.ino file.
Post by: larryd on Apr 24, 2019, 05:34 pm
On the Mac     / Java / examples / 01.Basics / BareMinimum
See post #6 and 8

https://forum.arduino.cc/index.php?topic=611876.msg4148957#msg4148957    (https://forum.arduino.cc/index.php?topic=611876.msg4148957#msg4148957)





Title: Re: Newcomers, change the IDE default BareMinimum.ino file.
Post by: GypsumFantastic on Apr 25, 2019, 10:49 am
On the Mac     / Java / examples / 01.Basics / BareMinimum
See post #6 and 8

https://forum.arduino.cc/index.php?topic=611876.msg4148957#msg4148957    (https://forum.arduino.cc/index.php?topic=611876.msg4148957#msg4148957)
It's probably worth adding that on Mac the file is replaced every time you upgrade the IDE so if the changes are non-trivial it might be worth keeping a backup copy somewhere outside the Arduino.app package.