11-18-2011 08:01 AM
Hi,
I am using an Arduino Mega 2560. Everytime I open Labview I have to change the Board Type from 'Uno' to 'Mega 2560' in de VISA resource.
This is a lot of work, because I have to change it in every low level analog/digital read/write block. I tried to change te default value in some of the case statements, but this isn't working.
Does someone know how to change the general default value in 'Mega 2560'?
I hope someone can help me.
11-18-2011 08:54 AM
On the block diagram you can right-click on the board type wiring wiring terminal and select create->constant. Change the constant to Mega and save your work.
If you need a front panel control then right-click on the board type wiring terminal and select create->control. Go to the front panel and change the control to the Mega. Right-click on the front panel control and select data operations->make current value default. Save your work and enjoy the result. (you should also update the label for the control! Uno is no longer the default).
Cheers
11-18-2011 12:21 PM
Drog, thanks for your help, I appreciate it!
Unfortunately I don't think this is the solution, as in all of the read/write blocks for the pins the Board Type is still set to 'Uno'. Also I tried to change the default value in the Init.vi file, but that didn't help either.
But when I select 'Mega2560' in all the blocks, I still can't use analog pin numbers higher than 5 so maybe something else is wrong?
11-21-2011 10:48 AM
-Martijn-
You should never have to enter every sub VI to change the board type. When you specify a board type in the init VI that information will be passed along in the 'Arduino Resource' cluster.
Can you post your code so we can take a look at it? I checked the code that checks to make sure the pin you specified exists, and it should support analog inputs 0-8. It looks like we should update this to allow AI0-AI15.
-Sam K