I was wondering that, would there be a chance, that I can dynamically call Arduino IDE to write to board?
For example, I have a text file (.ino) with a code in it. Can I use a script (e.g., python) to burn this text file into the board, rather than manually opening up the IDE with keyboard and mouse?
If you think that the Arduino IDE burns the text file (.ino) into the board, then you are a long way from doing this yourself. Use the IDE.
- Adds stuff to the top of the .ino file.
- Uses another program to compile the file and any others in related tabs.
- Uses another program to link the result of the compile.
- Uses another program to convert the link into another format.
- Uses another program to convert download the formatted file into your Arduino.
Thanks for your response!
I do understand that the IDE does a full build process, and sorry about the inaccuracy for saying an "ino" file. I was intending to say that, is there any chance that I can dynamically/programatically burn into the board, given all the files needed in a sketch, the correct target setting, and an IDE installed?
For example, in a larger app, I would like the user to dynamically pick how many analog pins to read from in a data logging context. It would be easier if the user can just enter a parameter like "4", rather than opening the arduino ide and finding that line of code and change it. I could send this number from the serial port in this case; but there are other cases, where dynamically burning into the board is the ultimate solution.
The point is that the upload to the board isn't handled by the IDE. That's all done with AVRDude. If the IDE can call AVRDude, then there's no reason to think that some other program can't.
What you want to do wouldn't have anything to do with the Arduino IDE. You wouldn't even need it on the computer that's doing the upload.
Exactly what I am looking for. Thank you!
You may find something useful in this Thread about using the command line
The source code for the IDE is available. Anything that the IDE does, you can learn to do.