Arduino Command Line Interface - Windows 8

Hi there!

As per this:Arduino/manpage.adoc at ide-1.5.x · arduino/Arduino · GitHub page I've been trying to create a powershell script that automatically uploads my sketch to my Arduino Leonardo when ran.

I can get my port name no problem but for whatever reason regardless of the command compilation I run it only opens arduino with my sketch loaded. I have some serial feedback in the program so I've verified that it is for sure not loaded. Below is a simplified version of the Powershell code I'm running.

& "C:\Program Files (x86)\Arduino\arduino.exe --board arduino:avr:leonardo --port COM3 --upload C:\Users\Dev\Documents\Arduino\myProject\myProject.ino"

I'm currently using the latest beta build of arduino, 1.5.6-r2 BETA. Any insight into what I'm doing wrong is much appreciated!

Edit: Just some additional info, that I didn't include earlier. I can't get this command to run from Command Prompt either, do I need to install something extra? I was under the impression that I didn't but I'm starting to doubt that at this point.

Just a guess but I think that you are passing the command as one very long string which the interpreter sees as one command.
Try this:

& "C:\Program Files (x86)\Arduino\arduino.exe" --board arduino:avr:leonardo --port COM3 --upload C:\Users\Dev\Documents\Arduino\myProject\myProject.ino

You need the quotes around the path to arduino.exe because it contains spaces but I don't think you need to quote the rest.

Pete

Hey Pete, thanks for the response!

I went ahead and tried it but still didn't get anywhere. It seems to start the Arduino IDE and it gives me a dialog box regarding a library I'm using(it always does this) but after that nothing else happens. I've confirmed that the program still isn't loaded via serial commands I should be able to send it.

Would love to hear any more ideas you've got!
-Karoly

I can't get this command to run from Command Prompt either

Does it print an error message?

Pete

Unfortunately it doesn't. It throws an Ignoring Bad Library Name error, which is what I was referring to earlier as I see this error every time I start the Arduino IDE. After "Ok"ing the dialog it pops up two more times and then that is it. I'm thinking maybe the error despite me okaying is blocking it somehow? I don't really know where I should be poking around to find more information about this.

I've noticed the latest IDE (I use 1.0.5r2) seems to read all the user library folder names and complains if any of them have 'improper' characters in their name. I had some library folders the used xxxx-yyyy in their names and the IDE would complain on startup unless I removed the "-" character in the folder name. Maybe that is stopping your command line script?

That thought had crossed my mind as well but I couldn't imagine it being something that simple. I got it working by resolving the library issue. Thanks so much guys, you rock!