Using wiringPi for Perl

General programming chat and advice for beginners

5 posts
by Eradicatore » Sun Nov 04, 2012 6:57 am
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
Posts: 18
Joined: Sun Jul 29, 2012 1:21 am
by Andybr1 » Tue Jan 08, 2013 8:36 pm
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
Posts: 2
Joined: Tue Jan 08, 2013 8:33 pm
by Andybr1 » Tue Jan 15, 2013 1:47 pm
Got it fixed as described here http://appco.de/?p=292
Posts: 2
Joined: Tue Jan 08, 2013 8:33 pm
by leol » Sat Feb 02, 2013 12:19 pm
Anybody got this working?
Do you have a simple example script?

Leo
User avatar
Posts: 110
Joined: Fri Jan 13, 2012 4:27 pm
Location: Reading, England
by gordon@drogon.net » 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
--
Gordons projects: https://projects.drogon.net/
User avatar
Posts: 1530
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK