I've been trying to do the mood cue project, and I set it up according to instructions (picture attached below). My servo wasn't sweeping the angles correctly, so I tried checking if my wiring was correct, which seems like it is.
Then I checked the serial monitor and noticed that the potentiometer values only shuffle between 300-400, even when the knob is turned all the way from one side to another.
I've attached a picture of the code below, along with a picture of the potentiometer readings and the actual potentiometer I'm using.
Posting a picture of code is useless. Please read the how to use this forum sticky post at the start of the section.
Is it a 50K pot, that is a bit high but in that setup should be just about fine. I would suggest that your connections are faulty, although a schematic would help a lot to see if it matched your photograph.
I didn't let that picture of the code deter me. I cropped the image, and used Acrobat's optical character recognition function to extract the text. Here's the first few lines of what I got:
Iincl ude< Servo. h>
Servo cyServ<>;
lll~ eo .... pc~Pln ~ '-0;
int pc~al;
l",~ .nqle;
As you might guess, it didn't compile. It looks like Grumpy Mike is right - you should post the code directly, as described in the sticky post, "How to use this forum - please read." shown at the top of the subject listing for this section of the forum.
I'll suggest that you connect A0 to 3.3V. Predict the readings, test it to see what really happens, and tell us what you saw. See if the results of that test suggest a solution to you.
When I ran your code, I got similar results: an analog value that varied between about 300 and 400. But, I had nothing connected to the analog input. I tried connecting the analog input to 3.3 V, and I got a reading of 683, corresponding to an angle of 60 degrees, as expected.
That makes me think that A0 might be open in your setup, too. We can't see the breadboard end of the connection between A0 and the wiper in the photo, in order to verify that the wire is in the right hole, so I'm suspicious that it's not in the right place. If it checks out for you, you might want to measure the voltage on A0 with a voltmeter, replace the jumper to A0, or even move the potentiometer to a different place on the breadboard.