Skip to Content
Hands-On Robotics Programming with C++
book

Hands-On Robotics Programming with C++

by Dinesh Tavasalkar
March 2019
Intermediate to advanced
312 pages
7h 37m
English
Packt Publishing
Content preview from Hands-On Robotics Programming with C++

Wiring connections

Connecting the LED to the Raspberry Pi is straightforward. Before doing this, however, let's take a closer look at the pins of the LED:

The LED contains one positive pin and one negative pin. The long pin is the positive pin, which you can connect to any data pin of the Raspberry Pi. The short pin is the negative pin, which can be connected to the ground pin of the Raspberry Pi.

Let's connect it up. First, connect the negative pin of the LED to the ground pin (physical pin number 6) of the Raspberry Pi. Next, connect the positive pin of the LED to wiringPi pin number 15:

Now the we've connected the LED to the Raspberry ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Robotics Programming

Learn Robotics Programming

Danny Staple
C++ Reactive Programming

C++ Reactive Programming

Praseed Pai, Peter Abraham

Publisher Resources

ISBN: 9781789139006Supplemental Content