Creating a ROS package for the blink demo

We are done with installing wiringpi; let's create a ROS package for the LED blink demo. I hope you have already created a ROS workspace on the board. For this demo, we are connecting the LED anode to the twelfth pin of the board (first pin in wiringpi). The LED cathode is connected to GND.

The following figure shows the circuit of the demo. It is applicable to RPi and Odroid.

Figure 24: Board connected to an LED

Okay! Let's make a ROS package for creating a blinking ROS node. Here is the command to create a ROS package for this demo:

    $ catkin_create_pkg ros_wiring_example roscpp std_msgs

You will ...

Get ROS Programming: Building Powerful Robots now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.