Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino Nano - Linx - Multiple Analog Read

I am using an Arduino nano, i have an LDR connected to A0 and a TMP 37 temp sensor to A1.

 

I managed to get the program to work when the the output resource of the first analogue read then goes into the "in" of the second analogue read, then output of that goes into the close vi.

 

The issue i had was the erratic temp sensor values, it would jump between 18-21 degrees Celsius, even when only sampling at every 1000ms.  I tried to "T" off the input resource wires before they reach the analogue reads, however i am having an issue with combining the output renounces to allows them to go into the close vi, as per the picture, any help please?

 

granty1988_0-1736666400098.png

 

0 Kudos
Message 1 of 16
(324 Views)

We can't debug pictures very well, but it clearly shows glaring errors and broken wires. Since the program cannot even run, it is not obvious how you can see incorrect measurements. Can you also show the program that gives the erratic data? 

 

You would probably get much better help if you attach your VIs and explain the measurement setup in more detail.

0 Kudos
Message 2 of 16
(294 Views)

Hello

 

Thanks for the reply, i have attached both version of the program, one with sequential reads / daisy chained, which is the one where i am having the issue reading a steady temperature.

 

granty1988_0-1736705866629.png

 

 

I have also included the original posts program as well. 

 

I noticed that i left the mean / average vi in the program, this was a mistake, it wasnt there when i tried the original or this program.

 

I am using an arduino nano, with the linx "add-on".  Not sure what other information you may need?

0 Kudos
Message 3 of 16
(282 Views)

You should access linx serially, not in parallel. It's a single connection to the microcontroller and it can't do things in parallel.

~ G stands for Fun ~
Helping pave the path to long-term living and thriving in space.
0 Kudos
Message 4 of 16
(272 Views)

Thanks, only issue I have is the temperature reading fluctuates about 3-4 degrees and is not steady at all, any idea what might cause this, I was wondering if it was because of the sequentially read information 

0 Kudos
Message 5 of 16
(267 Views)

Oh nvm I see you have the linx cluster passed in serially.

~ G stands for Fun ~
Helping pave the path to long-term living and thriving in space.
0 Kudos
Message 6 of 16
(263 Views)

Is that a good or bad thing?

0 Kudos
Message 7 of 16
(231 Views)

Good

~ G stands for Fun ~
Helping pave the path to long-term living and thriving in space.
0 Kudos
Message 8 of 16
(220 Views)

Is it possible to "T" off the information before they get to there respective read vi's, so i can try and eliminate the erratic read information?

0 Kudos
Message 9 of 16
(208 Views)

You only have a single connection to the arduino and the arduino can only do a single thing at a time so branching to try and run in parallel shouldn't have any difference at best, and could cause communication errors (I'm not familiar with whether or not the linx internals use some kind of mutex functionality) at worst.

~ G stands for Fun ~
Helping pave the path to long-term living and thriving in space.
0 Kudos
Message 10 of 16
(195 Views)