06-30-2021 08:30 AM
Hello!
I am having difficulty unfortunately in properly displaying the data obtained from the sensor. I know this is pretty basic knowledge, but I can't seem to get a handle on it.
The idea is that successive data received from the sensor should be placed in successive rows of the array. There are 14 values and all I get is either they are all displayed sequentially in the first cell, or the same value in all 14 cells. What am I doing wrong or what am I not doing?
06-30-2021 09:00 AM
If I am understanding what you are asking for this should work.
06-30-2021 09:02 AM
Can you save in an earlier version of LV than 19?
06-30-2021 09:04 AM
Version 14
06-30-2021 09:17 AM
Unfortunately, it doesn't yet work as it should. At the moment, these values are rather randomly placed in my opinion. More rows are added, and I would like there to be 14 of them and only refreshed values. So that I could read data from row e.g. 3 and give it to the chart. Each row is data from a different measurement channel.
06-30-2021 09:27 AM
OK this one will do that.
06-30-2021 09:33 AM
Unfortunately, still none of that. The way it currently works is that there are 14 rows but the data isn't in specific places, it just keeps changing places. They are moving in a loop.
06-30-2021 09:40 AM
Ok You need to be very specific as to what is it you are looking for. I get this data and it needs to go here. Please take some time and detail out what your expectations are for what you need and stop making me guess at what you need.
06-30-2021 10:13 AM - edited 06-30-2021 10:28 AM
@spalinowy wrote:
The idea is that successive data received from the sensor should be placed in successive rows of the array. There are 14 values and all I get is either they are all displayed sequentially in the first cell, or the same value in all 14 cells. What am I doing wrong or what am I not doing?
You really need to go back to the training resources, because your code makes absolutely no sense. Also define your terms, e.g. what is the meaning of "cell".
Let's have a look at one small section:
You have an array constant of 14 I32 integers that are all zero (no way to tell from a picture alone!), then you insert an array of new U8 values (we don't know the size of this array!) based on [i], pushing the existing zeroes to higher indices while coercing to I32, i.e. create a I32 array that is larger, then wire that to a U8 array indicator. That is all pure Rube Goldberg code!
We cannot help unless you exactly explain many things:
06-30-2021 03:56 PM
Thank you for your time and I appreciate it. I try to explain as best I can what I mean, which is not that easy....
Maybe I'll start like this.
The original code looked like this:
However, the problem was that it was executing too slowly due to the fact that in each loop, register settings were sent to the MPU9255 module. So I moved that part before the loop. However, I no longer know how to receive the data properly.
The outgoing array is size 14. It always has the same size and the data has the same position. This code is for the I2C protocol. In array pointer I want to see the current values that the sensor is registering. The scroll bar showed automatically and is not needed for anything.