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

Question #1

Open
amouly opened this issue Nov 29, 2014 · 4 comments
Open

Question #1

amouly opened this issue Nov 29, 2014 · 4 comments

Comments

@amouly
Copy link

amouly commented Nov 29, 2014

There is a way to control the servo throw the Raspberry GPIO, without a servo controller board?.

I mean, when you call:

pwm.export(0, 24,....), the "0" represents the "local" board?.

I'm learning about pwm on Raspberry, sorry for this question.

Nice library btw, thanks.

@djdeath
Copy link
Owner

djdeath commented Nov 29, 2014

Hi,

I'm not really familiar with the Raspberry, I mostly used this on an Intel Galileo board.
As far as I remember, the pins are identified by 2 numbers, but that might be something specific to the Intel board, the way the pin as muxed...

The library is just wrapper around reading/writing in /sys, so hopefully you can find some answers by digging into that directory.

@rzr
Copy link

rzr commented Jun 25, 2019

1st arg is chip id, 2d is pwm id...
I am afraid GPIO muxing is missing from this lib, may I open a ticket.

For the record on edison, I had to enable GPIO before using PWM:

chip=0
id=0
gpio=12
echo $gpio | sudo tee /sys/class/gpio/export
echo out | sudo tee /sys/class/gpio/gpio$gpio/direction
echo 0 | sudo tee /sys/class/gpio/gpio$gpio/value
sudo cat /sys/kernel/debug/gpio_debug/gpio$gpio/current_pinmux # mode0
echo mode1 | sudo tee /sys/kernel/debug/gpio_debug/gpio${gpio}/current_pinmux

Last item, it would be nice to align to iotjs API:
https://github.com/pando-project/iotjs/blob/master/docs/api/IoT.js-API-PWM.md

Relate-to: EnotionZ/gpio#60

@djdeath
Copy link
Owner

djdeath commented Jun 25, 2019

Sorry, I haven't used this in a few years and I'm unlikely to fix anything.
Feel free to fork/clone :)

@rzr
Copy link

rzr commented Jun 25, 2019

Yes, I noticed there isnt lot of activity going on

It look like there are still users:
https://www.npmjs.com/package/pwm

If orphaned it can be transferred to:
http://abandonware.github.io/

Relate-to: abandonware/abandonware.github.io#5

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

3 participants