Go Down

Topic: Can an arduino sketch switch "board" when it's opened? (Read 661 times) previous topic - next topic


I program often for multiple borads.
It's a pain in the a** the way I do it:
Open a sketch, then tools, board, (select proper board)   Ctrl-U  - happyness...  open another sketch, and repeat everything.

I'd like a open sketch to be able to set the proper board.   

is there some directive to do so ?
Thank you.


Your sketch can't set the board type. About the best it can do is generate a compile error if you have set the wrong board.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

Coding Badly

I believe this fork has that feature...


thanks, looks like a great tool. Will give it a try later.

Is it possible that a feature request like this will go thru wih the original Arduino  IDE ?  :
"- check the 10 first lines of a .ino project for a commented-out, or directive line that indicates preferred board - if found, then select that board."

Coding Badly

This is where requests can be added to the heap...

I believe the request is already there (somewhere).

The best way to get a feature added is to implement it then create a pull request on GitHub.

Go Up