From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

After Why I download LIFA to Arduino_UNO,Initialization digita_Pin some of the "0", some of the "1" ?

After Why I download LIFA to Arduino_UNO,Initialization digita_Pin some of the "0", some of the "1" ? How to reset all "0"?Need to modify the LIFA_Base? How to change?

0 Kudos
Message 1 of 11
(7,319 Views)

What does your LabVIEW code look like?  Have you tried setting their values after you set their pin modes (before your main loop)?

0 Kudos
Message 2 of 11
(3,713 Views)

Thank you Mr.Nathan_B's reply

I mean not to write any program in Labview and UNO, After  download LIFA_Base, UNO digital Pin IO port will not reset state. LIFA_Base Bug?

thank you!

0 Kudos
Message 3 of 11
(3,714 Views)

I'm not entirely sure I understand what you are saying.  Would I be correct in assuming that you are saying that when you first load LIFA_Base onto the Arduino, the LEDs light up as you have shown in the image above without running any LabVIEW code?

As stated in the Arduino documenation, all digital pins should default to inputs (a high impedance state) and therefore should not be lighting up any LEDs that you have connected to them.

0 Kudos
Message 4 of 11
(3,714 Views)

My application is IO port ontrol solenoid valve, if a power on ,IO is not initialized to zero,the solenoid valve action,the machine will be in danger,so the problem has been bothering me,I don't know how to solve it in LIFA_Base.

thank you!

0 Kudos
Message 5 of 11
(3,714 Views)

Nathan_B. 编写:

I'm not entirely sure I understand what you are saying.  Would I be correct in assuming that you are saying that when you first load LIFA_Base onto the Arduino, the LEDs light up as you have shown in the image above without running any LabVIEW code?

As stated in the Arduino documenation, all digital pins should default to inputs (a high impedance state) and therefore should not be lighting up any LEDs that you have connected to them.

yes, your  understanding is correct,but why the digital Pins is default to outputs?

0 Kudos
Message 6 of 11
(3,714 Views)

Mr Nathan_B

I modified the LIFA_Base void setup(),sovled my problem, is that OK?

thank you!

无标题.jpg

Message 7 of 11
(3,714 Views)

Your edit is perfectly fine.  It just doesn't make sense why they are not defaulting correctly.

0 Kudos
Message 8 of 11
(3,714 Views)

Hi,

I remenber that the same issue was discussed earlier about Mega boot state  :

https://decibel.ni.com/content/message/41624#41624

Pedro gave a countermeasure, but If I remember well, I quickly tried it with not much success.

Your solution sgh81 will probably be more efficient 🙂

regards

antoine

0 Kudos
Message 9 of 11
(3,714 Views)

The solution in the other thread will work as long as the Arduino is no rebooted or restarted in some way AFAIK.

0 Kudos
Message 10 of 11
(3,714 Views)