Setting a servo Angle Ardunio Classroom

This forum is dedicated to the author Joe Pardue as he teaches you about AVR C Programming in his workshop series.

Moderator: joepardue

Post Reply
frank_fg
Posts: 41
Joined: Tue Apr 29, 2008 9:07 am
Contact:

Setting a servo Angle Ardunio Classroom

Post by frank_fg » Wed Apr 30, 2014 3:11 pm

:sad:

Hi!

Just completed working on Ardunio 101 Classroom chapter 5.

Setting an angle on a servo.

It some what worked.

First I tested the servo using sweep servo test, all good.

uploaded code all good.

Serial monitor reads: Servo Angle 1.0
I entered an angle > 50

Serial monitor reads: Servo Angle 1.0
then scrolled forever and forever the same thing.

The servo did swing right to 180 degrees, and that's all.

I change the number 180 to 100 here > Serial.println(180-n);

and the servo moved 90 degrees.
But that all.

Has any one worked on this project yet?

What happen here?

Thanks

Frank G. P.S. sorry for being so wordy

User avatar
joepardue
Posts: 51
Joined: Sun Jul 31, 2011 7:44 am
Contact:

Re: Setting a servo Angle Ardunio Classroom

Post by joepardue » Thu May 01, 2014 5:19 am

Frank,

I'm sorry you are having an issue with the code. I'll look at it later this afternoon and see what I can figure out.

Joe

frank_fg
Posts: 41
Joined: Tue Apr 29, 2008 9:07 am
Contact:

Re: Setting a servo Angle Ardunio Classroom

Post by frank_fg » Thu May 01, 2014 9:45 am

:smile:

Hi! Joe

I'm a little curious on your Arduino 101 - classroom chapter 5
I ran experiments talking to a PC and controlling the brightness of an LED and everything worked fine,
yet setting the angle of a servo did not work so while.
I noticed that you use different codes almost to do the same thing, that is working with numbers - why is that?

Looking forward for your response.

Thanks

Frank G. P.S. I read your all articles even though I don't always do the experiment.

frank_fg
Posts: 41
Joined: Tue Apr 29, 2008 9:07 am
Contact:

Re: Setting a servo Angle Ardunio Classroom

Post by frank_fg » Thu May 15, 2014 6:28 pm

:grin:

Hi!

The problem was the computer, not one but two.

project worked find.


Frank G.

User avatar
joepardue
Posts: 51
Joined: Sun Jul 31, 2011 7:44 am
Contact:

Re: Setting a servo Angle Ardunio Classroom

Post by joepardue » Fri May 16, 2014 6:47 am

Frank,

Sorry I didn't get back on this. I couldn't duplicate the problem decided to give it a rest and then plumb forgot to get back to it. Glad you finally got it working.

Joe

frank_fg
Posts: 41
Joined: Tue Apr 29, 2008 9:07 am
Contact:

Re: Setting a servo Angle Ardunio Classroom

Post by frank_fg » Fri May 16, 2014 10:50 am

smile:

Hi!

That's ok.

I give things a rest a lot now days.

I love your website.


Thanks

Frank G.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests