Using wiringPi for Perl

General programming chat and advice for beginners

5 posts
by Eradicatore » Sun Nov 04, 2012 6:57 am
I used git to clone the source from and I was able to compile it with the (after updating it to point to the proper perl location) and that gave me a 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?

Posts: 18
Joined: Sun Jul 29, 2012 1:21 am
by Andybr1 » Tue Jan 08, 2013 8:36 pm

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


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
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?

User avatar
Posts: 126
Joined: Fri Jan 13, 2012 4:27 pm
Location: Reading, England
by » 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.

Gordons projects:
User avatar
Posts: 1570
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK