Page 1 of 1

Using wiringPi for Perl

Posted: Sun Nov 04, 2012 6:57 am
by Eradicatore
Hi,
I used git to clone the source from https://github.com/WiringPi/WiringPi-Perl and I was able to compile it with the build.sh (after updating it to point to the proper perl location) and that gave me a wiringpi.so. But I guess I'm not quite clear on the best way to use that. And then what I'm really wanting to do is use this wiringPi to communicate to a SPI based A2D chip I have hooked up. Anyone know what step to take next?

Justin

Re: Using wiringPi for Perl

Posted: Tue Jan 08, 2013 8:36 pm
by Andybr1
Hi,

would be great if you could share how you fixed build.sh exactly. I struggle around with it for quite some time now.

Thx

Andreas

Re: Using wiringPi for Perl

Posted: Tue Jan 15, 2013 1:47 pm
by Andybr1
Got it fixed as described here http://appco.de/?p=292

Re: Using wiringPi for Perl

Posted: Sat Feb 02, 2013 12:19 pm
by leol
Anybody got this working?
Do you have a simple example script?

Leo

Re: Using wiringPi for Perl

Posted: Sat Feb 02, 2013 1:53 pm
Wish I could help you with the SPI stuff - I don't even know if the wrappers on github support the SPI helpers in wiringPi though. (I didn't write them, just the underlying C routines) You can look in the examples in wiringPi though and in particular the Gertboard code for examples of driving the A/D and D/A chips on the Gertboard. Most others I've seen seem to operate in a very similar manner, but you'll likely need to do some bit mangling in Perl to extract the 10/12/etc/ bit results from the bytes returned from the SPI chips.

-Gordon