Taking advantage of the OS

Since the BeagleBone is running a full GNU/Linux operating system, there are plenty of great tools available for us to take advantage of. Let's look at a couple of the advantages an OS gives you.

Multiprocessing

Every time you click on Run in Cloud9, it launches the program as a new process, so you can easily run many different programs simultaneously. Let's add a second transistor/LED circuit, this time using GPIO3_19 on P9.27.

For this, you will need:

  • Breadboard
  • 2x 5 mm LED
  • 2x 4.7 kΩ resistor
  • 2x 68 Ω resistor
  • 2x 2N3904 NPN transistor
  • Jumper wires

Wire it up on your breadboard as shown here:

Multiprocessing

Now create a new file called blink2.py ...

Get Learning BeagleBone Python Programming 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.