<commit_before>## Blink

Blink an LED

### Bits you'll need

* 1 x [Arduino](http://littlebits.cc/bits/arduino)
* 1 x [power](http://littlebits.cc/bits/littlebits-power)
* 1 x [bargraph](http://littlebits.cc/bits/bargraph) 

![image](../images/arduino.jpg)
![image](../images/power.jpg)
![image](../images/bargraph.jpg)


If you don't have a bargraph, use an alternative LED bit instead e.g. [LED](http://littlebits.cc/bits/led), [Long LED](http://littlebits.cc/bits/long-led) or [Bright LED](http://littlebits.cc/bits/bright-led).

### Assembling the circuit

Connect power bit to d0 on Arduino bit, d5 on Arduino bit to bargraph bit.

![image](../images/blink.jpg)

### Code

```javascript
var five = require("johnny-five"), board, led;

board = new five.Board();

board.on("ready", function() {
  led = new five.Led(5);
  led.strobe( 1000 );
  this.repl.inject({
    led: led
  });
  console.log("You can interact with the bargraph via the variable 'led'");
  console.log("e.g. led.stop();\n Hit control-d to exit.\n >> ");
});
```
You can find a copy of this code in [1.blink/blink.js](./blink.js)

Run the code from the terminal e.g.

```sh
node 1.blink/blink.js
```

### What you'll see

A Light Emitting Diode (LED) converts electrical energy into light. The `strobe` function blinks the LED module on and off by varying the signal on the I/O pin to which the LED is connected between on (5V) and off.

All of the LEDs in the bargraph will blink on and off together, once per second (1000 milliseconds).

### What to try

Johnny-Five provides a REPL (Read-Eval-Print Loop) where you can type in commands to take effect immediately. From the REPL prompt try the following commands:

```javascript
led.stop();    // stop blinking or pulsing
led.off();     // turn led off
led.on();      // turn led on
led.pulse();   // pulse the led
led.fadeIn();  // fade to full brightness
led.fadeOut(); // fade to off
```

Hit control plus d on a new line in the REPL to exit and terminate the program.
<commit_msg>Remove ineffectual syntax highlighting for snippets<commit_after>## Blink

Blink an LED

### Bits you'll need

* 1 x [Arduino](http://littlebits.cc/bits/arduino)
* 1 x [power](http://littlebits.cc/bits/littlebits-power)
* 1 x [bargraph](http://littlebits.cc/bits/bargraph) 

![image](../images/arduino.jpg)
![image](../images/power.jpg)
![image](../images/bargraph.jpg)


If you don't have a bargraph, use an alternative LED bit instead e.g. [LED](http://littlebits.cc/bits/led), [Long LED](http://littlebits.cc/bits/long-led) or [Bright LED](http://littlebits.cc/bits/bright-led).

### Assembling the circuit

Connect power bit to d0 on Arduino bit, d5 on Arduino bit to bargraph bit.

![image](../images/blink.jpg)

### Code

```javascript
var five = require("johnny-five"), board, led;

board = new five.Board();

board.on("ready", function() {
  led = new five.Led(5);
  led.strobe( 1000 );
  this.repl.inject({
    led: led
  });
  console.log("You can interact with the bargraph via the variable 'led'");
  console.log("e.g. led.stop();\n Hit control-d to exit.\n >> ");
});
```
You can find a copy of this code in [1.blink/blink.js](./blink.js)

Run the code from the terminal e.g.


    node 1.blink/blink.js


### What you'll see

A Light Emitting Diode (LED) converts electrical energy into light. The `strobe` function blinks the LED module on and off by varying the signal on the I/O pin to which the LED is connected between on (5V) and off.

All of the LEDs in the bargraph will blink on and off together, once per second (1000 milliseconds).

### What to try

Johnny-Five provides a REPL (Read-Eval-Print Loop) where you can type in commands to take effect immediately. From the REPL prompt try the following commands:


    led.stop()    // stop blinking or pulsing
    led.off()     // turn led off
    led.on()      // turn led on
    led.pulse()   // pulse the led
    led.fadeIn()  // fade to full brightness
    led.fadeOut() // fade to off


Hit control plus d on a new line in the REPL to exit and terminate the program.

{'fraction_non_alphanumeric': 0.14067127344521224, 'fraction_numerical': 0.00839091806515301, 'mean_word_length': 3.4735099337748343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1841144', 'n_tokens_mistral': 1402, 'n_tokens_neox': 1313, 'n_words': 493}