11-09-2018 04:07 PM
hi
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
sorry
Solved! Go to Solution.
11-09-2018 07:44 PM
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.
11-10-2018 06:21 PM
Here is a much cleaner version of your code.
11-11-2018 11:23 AM
hey
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
11-11-2018 01:42 PM
I have no idea what an arduino compiler is that can take LabVIEW code to make Arduino code.
11-11-2018 01:44 PM
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