Editing myAutomation.h
The instructions containing all your objects and sequences is added to your EX‑CommandStation by creating a file called ‘myAutomation.h’ in the same folder as ‘CommandStation-EX.ino’.
Connecting your Arduino and pressing the Upload button in the usual way will save the file and upload your script into the Command Station.
You can create and edit the myAutomation.h using a text editor (like Notepad), but if you are using the Arduino IDE (rather than the EX‑Installer) you can create the myAutomation.h file in the Arduino IDE. Use the pulldown button and select New Tab (or simply press Ctrl+Shift+N).


Enter the file name “myAutomation.h” (This is case sensitive)

And type your script in.

Content
What you will need to add to your myAutomation.h file will be explained in the next few pages, but can be catogorised as:
Re-upload the EX-CommandStation software
Using EX-Installer
Place your ‘myAutomation.h’ file in the
CommandStation-EX
subfolder of wherever you extracted the EX‑Installer files.Re-Run EX‑Installer
Select the same options that you originally chose and upload
The myAutomation.h file will be automatically loaded with the EX‑CommandStation software.
Using the Arduino IDE
Place your ‘myAutomation.h’ file in the
CommandStation-EX
subfolder of wherever you extracted the EX‑CommandStation files from GitHub.Run the Arduino IDE
Open the
CommandStation-EX
folderSelect the Board, COM port etc. as before
click Upload
The myAutomation.h file will be automatically loaded with the EX‑CommandStation software.
Next Steps - Objects
Click here or click the Next button to learn how to add the key objects you will need to create your automation sequences.