CY8CKIT-049-42xx & Potentiometer & Matlab problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I want to plot potentiometer output values in Matlab. The plotted values are correct, but I don't like how it's plotted. I would like to get a simple ''line'', like on the picture nr.1, but my plot looks like the picture nr 2. So I don't know if that is wrong, since the values are correct but I can't get the ''line''...??? I get the ''line'' when I do the same thing with arduino.There are pictures, Matlab and PSoC code in attachments

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Put the

   

    ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);

   


into the main-loop.

   

You may use CyDelay(milliseconds) instead of for(i=0;i<100000;i++) {...

   

 

   

Bob

0 Likes
Anonymous
Not applicable

I tried but it's still the same problem 😞

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Use this to get best fit line y = mx + b. That should clean up your data.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

We used this to plot the data for Log amplifiers. That had to match a spec line. 

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

Could you give the plot without using the delimiter from 0-4. I just want to see how much the amplitude is? does  davidmo.m  give the right output ?

Best Regards,
VSRS

0 Likes