Skip to content

Instantly share code, notes, and snippets.

@DiegoTc
Created July 23, 2014 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save DiegoTc/855e0d8d0b6f6f53f06b to your computer and use it in GitHub Desktop.
Save DiegoTc/855e0d8d0b6f6f53f06b to your computer and use it in GitHub Desktop.
Bone101 Tutorial
<p>
</p>
<table class="table table-bordered">
<tbody>
<tr>
<td><span style="font-family: Arial;">
Beagle Bone Black
</span></td>
<td>
<img src="https://learn.adafruit.com/system/assets/assets/000/009/103/medium800/beaglebone_BBB.jpg?1396883195" style="width: 119.25px; height: 72.546875px;">
<br>
</td>
</tr>
<tr>
<td><span style="font-family: Arial;">
Leds
</span></td>
<td>
<img src="https://learn.adafruit.com/system/assets/assets/000/009/104/medium800/beaglebone_LEDs_5mm_assorted_colors.jpg?1396883218" style="width: 131.5px;">
<br>
</td>
</tr>
<tr>
<td>
<span style="font-family: Arial;">
470Ω Resistor
</span>
<br>
</td>
<td>
<img src="https://learn.adafruit.com/system/assets/assets/000/009/105/medium800/beaglebone_R-470-level.jpg?1396883232" style="width: 131.5px;">
<br>
</td>
</tr>
<tr>
<td><span style="font-family: Arial;">
Half-size solderless breadboard</span><br>
</td>
<td>
<img src="https://learn.adafruit.com/system/assets/assets/000/009/106/medium800/beaglebone_breadboard_half_web.jpg?1396883242" style="width: 125.25px; height: 63.546875px;"><br>
</td>
</tr>
<tr>
<td>
<span style="font-family: Arial;">Wires</span>
</td>
<td>
<img src="https://learn.adafruit.com/system/assets/assets/000/009/107/medium800/beaglebone_jumpers_web.jpg?1396883256" style="width: 118.25px; height: 60.546875px;"><br>
</td>
</tr>
</tbody>
</table>
<br>
<p>
</p>
<p>
<span style="font-family: 'Gotham SSm A', 'Gotham SSm B'; font-size: 30px; line-height: 30px;">
Wiring
</span>
<br>
</p>
<p>
<span style="font-family: 'Gotham SSm A', 'Gotham SSm B';">
Wire up the solderless breadboard using the header leads as shown below.
</span>
<span style="font-family: 'Gotham SSm A', 'Gotham SSm B'; font-size: 30px; line-height: 30px;">
<br>
</span>
</p>
<p>
<span style="font-family: 'Gotham SSm A', 'Gotham SSm B';">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<img src="https://learn.adafruit.com/system/assets/assets/000/009/108/medium800/beaglebone_fritzing.png?1396883299" style="width: 263px; float: none;">
<br>
</span>
</p>
<p>
<span style="font-family: 'Gotham SSm A', 'Gotham SSm B';">
Push the LED leads into the breadboard, with the longer (positive) lead towards the top of the breadboard. It does not matter which way around the resistor goes.
</span>
<span style="font-family: 'Gotham SSm A', 'Gotham SSm B';">
<br>
</span>
</p>
<span style="font-family: 'Gotham SSm A', 'Gotham SSm B';">The top two connections on the BBB expansion header we are using (P8) are both GND. The other lead is connected to pin 10, which is the right-hand connector on the fifth row down. The pins are numbered left to right, 1, 2 then on the next row down 3,4 etc.</span>
var b = require('bonescript');
var led = "P8_12";
var state = 0;
b.pinMode(led, 'out');
toggleLED = function() {
state = state ? 0 : 1;
b.digitalWrite(led, state);
};
timer = setInterval(toggleLED, 100);
stopTimer = function() {
clearInterval(timer);
};
setTimeout(stopTimer, 3000);
<h5 style="font-family: 'Gotham SSm A', 'Gotham SSm B'; line-height: 20px; color: rgb(0, 0, 0); margin: 0px; font-size: 16px; padding-bottom: 5px;"><span style="color: rgb(0, 172, 236); background-position: initial;">Blinking an LED with BeagleBone Black<br><span style="color: rgb(51, 51, 51); font-size: 13px; line-height: 18.571430206298828px; background-color: rgb(255, 255, 255); background-position: initial;">Make an LED Blink using Python on a BeagleBone Black<br></span><span style="color: rgb(51, 51, 51); font-size: 12px; line-height: 17.142858505249023px; background-color: rgb(255, 255, 255); background-position: initial;">In this tutorial, you will learn how to control an external LED using a BeagleBone Black (BBB) from Bonescript Library.<br></span><img src="https://learn.adafruit.com/system/guides/images/000/000/309/medium310/overview.jpg?1396718934" style="width: 152.25px; height: 92.59375px;"><br></span></h5>
Preview Card 1
You Will Need
Wiring
Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment