- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok then, thank you.