Category Archives: Robots

wiringPi GPIO only pin 7 working

wiringPi GPIO only pin 7 working

 

So as I continue to work with wiringPi GPIO in the C/C++ Language I had a fun experience trying to drive the motors for the robot my daughter and I are building. We are using the L298N driver board
, and I am programming in C/C++ using wiringPi to control the GPIO however I could only get Header 7/Pin 7 to actually kick on the motor. I struggled with this for a while, I could perform all of the functions of the driver through swapping wires to that pin but Header/Pin 11, 13, or 15 with wiringPi. In exasperation I started searching the wiringPi website and came across a graphic that I should have found earlier:

wiringPi GPIO only pin 7 workingThus I found out that there was a large difference between Header number and the pin number and that pin 7 was the only one that had the same number in both. Header 11 is wiringPi pin 0, Header 13 is wiringPI pin 2, and header 15 is wiringPi pin 3. Learn more about the wiringPi Library here

Back to work on this:

Raspberry Pi robot construction GPIO wiringPI

Get a new domain name, or an unlimited hosting service to host multiple websites! Some services are 50% off.
Put your business online!  Get a $8.99 .COM/.NET from GoDaddy!