Potentiometer & CY8CKIT-049-42xx problem, help!

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 tried to make the same thing as the man in this video: https://www.youtube.com/watch?v=rQjvZwaCM14  

   

My project is attached.

   

So when I connect potentiometer to pin 2[5] (and of course other two to GND and VDD) and rotate it, LED is blinking the same whole time, which is wrong. I don't know where is the problem. Later I want to print the voltage defined by potentiometer in terminal, but right now I'm feeling that  this doesn't reflect input voltage at all. 

   

I need this for my college project.

   

Can someone please help me? Thanks

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

Welcome in the forum.

   

The pin is not quite connected to the ADC, there is a small gap.

   

You do not delay for values between 2 and 2046

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you very much, I changed it and it's working. Now I'll try to print voltage values in terminal so I hope I'll do that successfully.

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

Use an UART connected to the right pins (check schematic) and use sprintf() and UART_PutString APIs. When printing floats set the heap size (in System view) to 0x0200.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you, it's working.

   

Now I'm wondering is it possible to send data to MATLAB with UART(SCB mode) component instead of UART?

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

Yes, of course. The differences between the UART versions are the underlying hardware resources Serial Control Block (SCB) or Universal Digital Block (UDB). The functionality is the same (you know one UART, you know them all) the APIs differ a bit.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Ok then, thank you.

0 Likes