WiringPi / WiringPi-Node

Node.js bindings to wiringPi
334 stars 94 forks source link

Question about analogRead pin docs #9

Closed keeganbrown closed 9 years ago

keeganbrown commented 10 years ago

doc entry for reference: https://github.com/eugeneware/wiring-pi#wpianalogreadpin

I've got a gertboard and I'm trying to get it to talk to wiring-pi. The docs mention "You will need to register additional analog modules to enable this function for device such as the Gertboard, quick2Wire analog board, etc."

What "analog modules" is this referring to? Happen to have an example of how I might enable the gertboard module?

Fantastic work BTW. Thank you thank you thank you for working on this.

eugeneware commented 10 years ago

I think these are what it's referring to:

http://wiringpi.com/dev-lib/gertboard-analog/

This was a fork from https://github.com/Soarez/node-wiring-pi so I don't have direct experience in loading these modules myself, unfortunately. Hope that helps!

nekuz0r commented 10 years ago

eugeneware is right, getboard support is not available right now, but the next version will include it.

If you really want gertboard support immediately, you can try the unstable 2.0. https://github.com/nekuz0r/wiring-pi/tree/incoming-v2.x

keeganbrown commented 10 years ago

I ended up using spawn to fork a child process using wiringpi's gpio utility -- eg: "gpio gbr 0" -- and then reading the output of that. Works well enough for my prototype at this stage of the game. Thanks for the prompt responses and hard work!