Troubleshooting

Hello,

I found an error while uploading a LIFA_Base (Labview Interface Code) in my Arduino Uno. I have posted it below. If anyone knows Please let me know how to fix it. I am waiting for your reply.

Thanks in advance.

Arduino: 1.8.5 (Windows 10), Board: “Arduino/Genuino Uno”

C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base\LabVIEWInterface.ino: In function ‘void processCommand(unsigned char*)’:

C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base\LabVIEWInterface.ino:150:60: warning: left shift count >= width of type

duration=(command[8]+ (command[7]<<8)+ (command[6]<<16)+(command[5]<<24));

^

C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base\LabVIEWInterface.ino:150:77: warning: left shift count >= width of type

duration=(command[8]+ (command[7]<<8)+ (command[6]<<16)+(command[5]<<24));

^

C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base\LabVIEWInterface.ino: In function ‘sevenSegment_Config(unsigned char*)’:

C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base\LabVIEWInterface.ino:632:41: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations]

sevenSegmentPins[(i-1)] = command*;*

  • ^*
    C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base\LabVIEWInterface.ino:629:3: note: containing loop
  • for(int i=2; i<10; i++)*
  • ^*
    C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\main.cpp: In function ‘main’:
    C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base\LabVIEWInterface.ino:632:41: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations]
    _ sevenSegmentPins[(i-1)] = command*;_
    _
    ^_
    C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base\LabVIEWInterface.ino:629:3: note: containing loop
    _
    for(int i=2; i<10; i++)_
    _
    ^_
    Sketch uses 18112 bytes (56%) of program storage space. Maximum is 32256 bytes.
    Global variables use 1120 bytes (54%) of dynamic memory, leaving 928 bytes for local variables. Maximum is 2048 bytes.
    avrdude: ser_open(): can’t open device “\.\COM5”: Access is denied.
    Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
    This report would have more information with
    _
    “Show verbose output during compilation”*_
    option enabled in File → Preferences.

(deleted)

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup (the smiley faces in your post for example), leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn’t show the posting toolbar then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

The error:

avrdude: ser_open(): can't open device "\\.\COM5": Access is denied.

can be caused by another program having the COM port open. I suspect that program might be LabView.

Thanks for your reply. I have fixed it.

It could be useful for future readers with the same problem if you could post your solution.

How did you fix it? I've got the same error and would prefer to use LIFA over LINX if I can. TIA