I am new to Raspberry Pi and Linux so sorry for the basic questions. I am utilizing the Adafruit 16 Servo hat for the Rasperry Pi. The Hat utilizes I2C. I am programming in C and have had difficulties trying to use the hat using WiringPi. Ultimately I am trying to control five servos and will also have a GPS and IMU hooked up to this Hat. I am using Eclipse to develop and run code. So I have a few questions.

Can I use Wiring Pi libraries to communicate to this hat and control servos? Are there other libraries written in C that would be more beneficial for my purposes? And since I am running programs in Eclipse on the Pi, I just want to double check that I do not need to execute my programs using terminal, but rather can just test my code with the run button in Eclipse.


Yes you definitively can use wiring pi with this hat. http://wiringpi.com/reference/i2c-library/ , you'll find there all the function you will need. You need to enable the I2C ports on your Pi. You'll find plenty of tutorial out there but you can use also wiring pi function as said in the first part of the link I gave you. If I were you I would try to get working one servo and then all the other one you'll have figured out how that's working. About the IDE, I would say that it's not always a good idea to depend on the IDE build/run since it lack of precision and may hide some stuff from you. But that not mandatory you could build the build chain with Eclipse even if I don't know how.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.