Showing results for 
Search instead for 
Did you mean: 

greenhouse using arduino/labview

Go to solution


i recently made a greenhouse project

where i implemented 10 LEDs using arduino and labview

iam still a beginner in arduino as well in labview so iam kinda of lost in somethings

first problem i had i couldnt use the compiler and it kept giving me the 2 duplicate digital pins error

second i wanted to show the light intensity on the LCD screen instead of the laptop but iam also having a hard time using labview for the LCD 

any help would be really appreciated

again iam not that good in arduino and labview


0 Kudos
Message 1 of 6

You have a lot of duplicate code.  Each true and false case could be replaced by a single select feeding a 1 or 0 to the subVI.  Actually, you just need a boolean to 0,1.


You could also use a For Loop and minimize the code further.


But your Set Digital Pin Mode should only need to be done once before your while loop starts.  And again, use a For Loop for that.

0 Kudos
Message 2 of 6
Accepted by topic author omar675

Here is a much cleaner version of your code.

0 Kudos
Message 3 of 6


thanks for the help

really appreciate it

i was able to understand what exactly did you do in the cleaner VI and why

however I am still getting an error when I try to use the arduino compiler and due to my skills, I still cant manage to fix it exactly, can you just briefly what my issue is again

I am sorry if my questions are dumb, its my first time using this 

0 Kudos
Message 4 of 6

I have no idea what an arduino compiler is that can take LabVIEW code to make Arduino code.

0 Kudos
Message 5 of 6

its alright 

i will figure it out eventually

thank you for your help

the cleaner version is definitely an improvement and solved some of the problems i had

0 Kudos
Message 6 of 6