Using ROS to control GPIO pins on a Raspberry Pi 3
As the title says, it was time for me to document how to do the "simple" task of using ROS (Robot Operating System) to turn an LED on/off (well, we can do a LOT more than that by using the GPIO pins, but as a baseline, it's a starter). Because I've installed ROS onto the Raspberry Pi itself, I can create ROS nodes directly on the RPi. So let's get on with it and create a simple demo to blink an LED using ROS topics from the RPi. First step, we have to download " wiringPi " $ git clone git://git.drogon.net/wiringPi $ cd wiringPi $ sudo ./build The interesting thing is that everyone decides how they are going to refer to the GPIO pins on the RPi ...I just keep track of the physical pin (as that doesn't change!) And here is the GPIO pin layout in relation to wiringPi: https://projects.drogon.net/raspberry-pi/wiringpi/pins/ Now that we've installed the library we're going to be using, let's switch to creating a ROS package...