These are chat archives for nebrius/raspi-io

10th
Mar 2016
Tiago Alves
@tralves
Mar 10 2016 00:56
Hi! I made this module raspi-soft-pwm that extends Peripheral and uses pigpio
I need to pass the gpio pin number to pigpio
but raspi-peripheral stores pins with the wiring-pi number.
how can I get the GPIO pin number from Peripheral?
Bryan Hughes
@nebrius
Mar 10 2016 00:59
you could use raspi-board’s getPins method to do that
(also, yay for creating the module!)
Tiago Alves
@tralves
Mar 10 2016 00:59
I checked the raspi-board methods
Bryan Hughes
@nebrius
Mar 10 2016 00:59
so that method will return an array of all pins, with the wiringpi pin as the index
Tiago Alves
@tralves
Mar 10 2016 00:59
ok.
then I'll have to do the parsing stuff.
thanks!
Bryan Hughes
@nebrius
Mar 10 2016 01:01
then, after you call super(pin), you can get the wiring pi pin number from this.pins[0]
and yeah, then use a regex
Tiago Alves
@tralves
Mar 10 2016 01:01
ok. I'll do that. Thanks for the pointers.
Bryan Hughes
@nebrius
Mar 10 2016 01:02
np, and thanks for writing this up!
Tiago Alves
@tralves
Mar 10 2016 01:03
I wrote this last December. You helped me at the time, remember?. Then I never got to test it properly, and guess what, doesn't work :P
Bryan Hughes
@nebrius
Mar 10 2016 01:04
I remember you mentioning wanting to code it, I didn’t realize, or I forgot, that you wrote some stuff (probably forgot)
:sweat_smile:
Tiago Alves
@tralves
Mar 10 2016 16:13
so this is what I have been up to: https://github.com/tralves/j5-pi2go
I am making a Pi2Go bot fully operational through johnny-five
this is the bot
the only thing missing is the sonar, which I think I will get done with this new pingRead implementation :)
Bryan Hughes
@nebrius
Mar 10 2016 17:42
awesome!
couple notes @tralves. First is that the license says copyright me, 2014. Probably want to change that ;-)
Second, do you think you can create an install script that installs pigpio are part of postinstall?
I’d love to integrate this into raspi-io some day, but one requirement I have is that you can install it and it “just works"
also, the changelog seems to have the raspi-pwm changelog
Tiago Alves
@tralves
Mar 10 2016 17:47
Ok! I'll do that.
thanks for the review
Bryan Hughes
@nebrius
Mar 10 2016 17:53
also, feel free to publish raspi-soft-pwm from your npm account, it doesn’t need to be published by me :)
Tiago Alves
@tralves
Mar 10 2016 17:54
got it!