Go Down

Topic: Arduino settings in code, is it possible? (Read 297 times) previous topic - next topic

Adrianotiger

I have different boards (say Arduino UNO, Teensy, ATTiny, ...)

At 99% if you design something it is destinated to a specific board with specific settings.

For example (Teensy):
- NO USB
- 72MHz

Once I open the IDE for an ATTiny, the settings on the IDE are set for this chip.
Once I open the Teensy project again, ATTiny is selected. I can change it manually, but then the frequence is reset to 96MHz and the USB is also set again to Serial.

Is there a way to save the chip setting in the .ino file? Maybe as comment, so that the Arduino IDE will change automatically the settings once the project is opened?

Thanks!

septillion

Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

pert

This has been often requested for the standard IDE but no progress on actually adding the feature. However I think there is something of the sort in the Arduino Web Editor, though that does not support Teensy or any ATtiny.

What you can do is to use the Arduino IDE's CLI to make the configuration changes you want. You could write a script/batch file that sets the preferences and also opens the .ino file you want associated with those preferences. For more information see:
https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc

Go Up