admin管理员组文章数量:1308212
I'm using a Arduino nano and am trying to upload a .hex file to the Arduino using the ArduinoUploader Package through a C# interface. And I run into the error:
Unable to aqcuire sync in SendWithSyncRetry for request of type ArduinoUploader.BootloaderProgrammers.Protocols.STK500v1.Messages.ReadSignatureRequest!
Code:
static SerialPort _serialPort = null!;
static void ResetArduino(string portName)
{
_serialPort = new SerialPort(portName, 1200);
using (_serialPort)
{
_serialPort.Open();
_serialPort.Close();
}
System.Threading.Thread.Sleep(5000);
}
static void Main(string[] args)
{
try
{
ResetArduino("COM8");
var uploader = new ArduinoSketchUploader(
new ArduinoSketchUploaderOptions()
{
FileName = @"PATH_TO_HEX",
PortName = "COM8",
ArduinoModel = ArduinoModel.NanoR3
});
uploader.UploadSketch();
}
catch (ArduinoUploaderException ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
本文标签: Error while uploading hex file to Arduino Nano using ArduinoUploader in NET CStack Overflow
版权声明:本文标题:Error while uploading .hex file to Arduino Nano using ArduinoUploader in .NET C# - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741856915a2401396.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论