Notifications
Clear all

Do you ever ask: why am I writing this code AGAIN?  

  RSS

itsCaseyDambit
(@itscaseydambit)
Eminent Member
Joined: 3 months ago
Posts: 46
2020-05-07 9:56 am  

When you open a new file in the Arduino IDE, they give you a setup() and a loop() function for you to fill in the blanks. How often do you call Serial.begin() so that you can monitor your program? Yes, me too, all the time. That's why I have a personal starter.ino file.

It has all of the header information waiting to be filled in, with commands to get the Serial.com started and to send messages to the user that a com line was established and that the program has begun running. It's all there for me at the beginning, so I don't have to retype and retype and...

I've attached my starter file if anyone is interested in what I'm talking about. Create your own. Works for me.

Take care!

 


Quote
starnovice
(@starnovice)
Estimable Member
Joined: 1 year ago
Posts: 168
2020-05-07 2:57 pm  

This is a great idea.  Can you tell me where you store it so it gets loaded when you do a new project?

Pat Wicker (Portland, OR, USA)


ReplyQuote
itsCaseyDambit
(@itscaseydambit)
Eminent Member
Joined: 3 months ago
Posts: 46
2020-05-07 3:09 pm  

I keep it in my Arduino folder, along with my other current projects.

I simply open this file instead of "New" from the menu.

I then rename it before modifying so it stays in its original form.

Easy peasy.


ReplyQuote
adrian
(@adrian)
Active Member
Joined: 1 month ago
Posts: 13
2020-07-21 5:43 am  

I'm still surprised we're still using the Arduino IDE to write code. I miss so many of the features I use in my other non-arduino projects when using IntelliJ. It is hard to believe that with such an active community there isn't a better / more featured toolchain to develop on this platform.


ReplyQuote