Notifications
Clear all

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

6 Posts
5 Users
1 Likes
1,296 Views
itsCaseyDambit
(@itscaseydambit)
Member
Joined: 4 years ago
Posts: 40
Topic starter  

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)
Member
Joined: 5 years ago
Posts: 110
 

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)
Member
Joined: 4 years ago
Posts: 40
Topic starter  

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)
Member
Joined: 4 years ago
Posts: 12
 

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
jker
 jker
(@jker)
Member
Joined: 3 years ago
Posts: 82
 

There are other options out there... but the Arduino IDE is just so convenient for its built in package manager and seemingly universal support.

For larger projects, though, something like PlatformIO with a decent project editor is pretty convenient.

"A resistor makes a lightbulb and a capacitor makes an explosion when connected wrong"
"There are two types of electrical engineers, those intentionally making antennas and those accidentally doing so."


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 

I have used PlatforIO, and VSCode is now rumored to work on the Pi, as well as Eclipse, and XOD is definitely interesting

Xod and Arduino IDE is sorta limited to Arduino type thingies, whereas PlatformIO, VSCode and Eclipse are a bit more versatile

On the other hand, I couldn't program my way out of a paper bag, so the smart people don't listen to me


   
jker reacted
ReplyQuote