Im building Mastermind game for my school project and I have this problem, I should be able to adjust number from 0 to 9 via buttons, first and second one works perfectly but third and fourth are going by themselves, I thought its broken button so I bought 2 new and it didnt help at all. it should be put together correctly, Any sugestions?
Arduino - YouTube - here's problem.
I will take a SWAG but I think you forgot to set the PinMode on several of the pins. The 100K should work but I would prefer something in the 5K range to force about 1 mA through the switches. This is old school but it works for me.
The circuit looks correct. I cannot see the actual connections on the picture. If you have access to a volt meter connect it to A0 and see if it changes with the pot. If so you probably have a bad port. If it does not change, remove the connection and see if the pot changes the voltage, if so you probably have a bad port. If you get the same results on another port you probably have a bad Arduino (I suspect this is the case). Since your reference voltage is the Arduino +5 and the grounds are the same the readings should stay stable even if the regulator drifts. If you are reading an external voltage the readings will change if the Arduino regulator drifts.
@ioverown, your topic has been moved to a more suitable location on the forum.
Posting code might be useful for us to help you. If you haven't done so yet, please read How to get the best out of this forum and use code tags as explained.
Maybe I'm wrong but I guess some code is involved. Please post here, and use Autoformat in IDE and then code tags.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.