B4R Question Arduino upload sketch error

Beja

Expert
Licensed User
Hello all,
After a long time, today I thought I can play with B4R and used to LED example project. but I got the following error:
=====================
B4R Version: 2.51
Parsing code. (0.00s)
Compiling code. (0.21s)
Building project (0.79s)
Compiling & deploying Ino project (Arduino/Genuino Uno - COM8) Error
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
Uploading...
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Arduino\B4R\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM8
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: ser_open(): can't open device "\\.\COM8": The semaphore timeout period has expired.


avrdude done. Thank you.
An error occurred while uploading the sketch
===============================

And this is the code:
Hello all,
After a long time, today I thought I can play with B4R and used to LED example project. but I got the following error:
=====================
B4R Version: 2.51
Parsing code. (0.00s)
Compiling code. (0.21s)
Building project (0.79s)
Compiling & deploying Ino project (Arduino/Genuino Uno - COM8) Error
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
Uploading...
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Arduino\B4R\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM8
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: ser_open(): can't open device "\\.\COM8": The semaphore timeout period has expired.


avrdude done. Thank you.
An error occurred while uploading the sketch
===============================

And this is the code:
<CODE>

#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region

Sub Process_Globals
Public Serial1 As Serial
Private pinButton As Pin 'pin for the button
Private pinLEDGreen As Pin 'pin for the green Led
Private LightOn = False As Boolean
End Sub

Private Sub AppStart
Serial1.Initialize(115200)

'Using the internal pull up resistor to prevent the pin from floating.
pinButton.Initialize(pinButton.A5, pinButton.MODE_INPUT_PULLUP)
pinButton.AddListener("pinButton_StateChanged")

pinLEDGreen.Initialize(7, pinLEDGreen.MODE_OUTPUT)
End Sub

Private Sub pinButton_StateChanged (State As Boolean)
If State = False Then 'remember, False means button pressed.
LightOn = Not(LightOn)
pinLEDGreen.DigitalWrite(LightOn)
End If
End Sub
</CODE>
 

Mark Read

Well-Known Member
Licensed User
At first glance, either you have selected the wrong COM port or the COM port is blocked from another application.
Have you installed the USB driver which normally is included in the Arduino IDE software?
Have you tried restarting the PC to free the port?

Regards
Mark
 
Upvote 0
Top