hi
I'm trying to control the angle of the system using Arduino, motor, and MPU.
We will calculate the angle through the MPU and use the motor to control it to follow the reference angle.
I already have the reference angle data as Excel data.
To do this, I think the reference data must be saved in Arduino in the form of an array. Is there a way to save Excel data in the form of variables in Arduino?
Save the data from Excel as a commas separated values file and you have the basis of an array that can be copied to an array in an Arduino sketch with very little typing
How many entries are there, what data type are they and which Arduino are you using ?
thanks you for your reply!
But there are 4000 pieces of data to do as you say.
This is angle data for each frame, and the data we collected is at 1200Hz, so there is a lot of data.
I'm using Arduino Uno.
Will that much data fit in an array on a Uno ?
What data type are you using ?
maybe float or double?
cause its dimension is angle
A float takes 4 bytes of memory. Doubles on a Uno are really floats. You could put the array in PROGMEM as it is a table of constants
The fact that there are 4000 pieces of data makes no difference to the method if getting it to an array that I suggested
Refer to your other thread on the same question, and understand why we insist on a single topic. I asked for further clarity there, only to find it here in this thread. That is bad form on this forum.
An Uno has only 2 kbytes of RAM, so you'll not store 4000 floats. You'll need to select a different processor, OR reduce your needs substantially.
Your other topic on the same subject deleted.
Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.
Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.
Repeated duplicate posting could result in a temporary or permanent ban from the forum.
Could you take a few moments to Learn How To Use The Forum
It will help you get the best out of the forum in the future.
Thank you.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.