Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying to only use one pin for one servo? #6

Closed
SteffanDonal opened this issue Mar 12, 2013 · 6 comments
Closed

Modifying to only use one pin for one servo? #6

SteffanDonal opened this issue Mar 12, 2013 · 6 comments

Comments

@SteffanDonal
Copy link

What would I need to change in the kernal driver to only have it use one GPIO pin?

@richardghirst
Copy link
Owner

Hi, if you use the new userspace servod.c implementation, all you should
need to do is comment the entries in the servo2gpio[] array that you don't
want. I.e. in you case, comment all entries but one.

Richard
On 12 Mar 2013 14:41, "Ruirize" notifications@github.com wrote:

What would I need to change in the kernal driver to only have it use one
GPIO pin?


Reply to this email directly or view it on GitHubhttps://github.com//issues/6
.

@theuberchad
Copy link

Hello,

Firstly this module is fantastic!

I was curious though if you could do the same thing to the kernel driver as well? I was looking at the servoblaster.c code and that it had the following

static uint8_t servo2gpio[] = {
4, // P1-7
17, // P1-11
#ifdef PWM0_ON_GPIO18
1, // P1-5 (GPIO-18, P1-12 is currently PWM0, for debug)
#else
18, // P1-12
#endif
21, // P1-13
22, // P1-15
23, // P1-16
24, // P1-18
25, // P1-22

If I were to comment out all the lines except for pins 4 and 17 would that achieve the same thing?

@jminardi
Copy link

jminardi commented Sep 4, 2013

@richardghirst Should commenting out still work? I tried that and everything seemed to compile and run fine, but my servo no longer responded to commands. When I first run servod it does list that I only had 1 servo...

@richardghirst
Copy link
Owner

It should still work, but I admit I've not tested that. I'll take a look
in the next couple of days.

On Wed, Sep 4, 2013 at 10:36 PM, Jack Minardi notifications@github.comwrote:

@richardghirst https://github.com/richardghirst Should commenting out
still work? I tried that and everything seemed to compile and run fine, but
my servo no longer responded to commands. When I first run servod it does
list that I only had 1 servo...


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-23826900
.

@jminardi
Copy link

jminardi commented Sep 5, 2013

@richardghirst After restarting my computer and recompiling again it worked for me.

Thanks for the awesome software!

@richardghirst
Copy link
Owner

Closing this as you can now specify which pins you want to use for servos via the --p1pins= option to servod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants