I am trying to upload a blink.hex
file to an Arduino through C# using this code:
string Folder1 = @"C:\Program Files(x86)\Arduino\hardware\tools\avr/bin/avrdude";
string Folder2 = @"C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf";
string Hexpath = @"C:\VG-Break In\HEX\VBISU.ino.hex";
string arg =
"-C" + Folder2
+ "-v -patmega328p -carduino -P" +
cmbports.SelectedText.ToString() +
"-b115200 -D -Uflash:w:" + Hexpath + "i";
Process.Start(@"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" ,arg);
But it doesn't upload. I just see that cmd blinks for a fraction of a second...
The line I see in my Arduino IDE when uploading is:
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM5 -b115200 -D -Uflash:w:C:\Users\VICTOR~1\AppData\Local\Temp\arduino_build_426502/VBISU.ino.hex:i