Go Down

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

AndreK

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.

johnwasser

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: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Coding Badly


I believe this fork has that feature...
http://forum.arduino.cc/index.php?topic=176498.0

AndreK

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...
https://github.com/arduino/Arduino/issues

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