Just a heads up, I'm very new to C+ programming and electrical engineering.
So I found a program in a youtube video that changes the rate of blinking of an LED based on the value of a potentiometer. It worked. Later, when I was using servos, they suddenly started to act weird. When I went back to the program I mentioned, it didn't work either. I set up a serial monitor and printed the value of the potentiometer and found some interesting results. The value seemed to be randomized. I have no idea what to do or what's going on.
I've attached a list of the results that I got to give you an idea of what I am working with.
I would be super thankful for any help that you could provide.
cwduffy01:
The electrical connections seem fine. How do I maintain a jumping voltage then?
Maintain
verb: maintain; 3rd person present: maintains; past tense: maintained; past participle: maintained; gerund or present participle: maintaining
cause or enable (a condition or situation) to continue.
"the need to maintain close links between industry and schools"
synonyms: continue, keep, keep going, keep up, keep alive, keep in existence, carry on, preserve, conserve, prolong, perpetuate, sustain, bolster (up), prop up, retain, support, bear
"the need to maintain close links between industry and schools"
So to maintain the jumping voltage reading do nothing, it is jumping fine.
Their is a gap in the power rails on that bread board so the left side is not connected to the right side. So as people told you there is no ground on the pot and the input is floating.
Please read this:- How to use this forum
Because your post is breaking the rules about posting code.
Image guide tells you how to post pictures image guide
Grumpy_Mike:
Their is a gap in the power rails on that bread board so the left side is not connected to the right side. So as people told you there is no ground on the pot and the input is floating.
Please read this:- How to use this forum
Because your post is breaking the rules about posting code.
Image guide tells you how to post pictures image guide
Oh my god I would have never found that gap in the power rails. Thank you! Everything's working perfectly now.
And thank you for informing me about the code rule as well.