# Beaglebone green wireless gateway

**URL:** https://discourse.nodered.org/t/beaglebone-green-wireless-gateway/47737
**Category:** General
**Created:** [28 June 2021 08:45 UTC](https://discourse.nodered.org/t/beaglebone-green-wireless-gateway/47737 "2021-06-28T08:45:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Aivaras](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@Aivaras](https://discourse.nodered.org/u/Aivaras)
#### Post date: [28 June 2021 08:46 UTC](https://discourse.nodered.org/t/beaglebone-green-wireless-gateway/47737/1 "2021-06-28T08:46:00Z")

</div>

Hello,

Can someone write a script to function block to read analog value using A0 pin ?  
Johhny5 function blocks crashes my node-red

Best regards  
Aivaras

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [28 June 2021 09:13 UTC](https://discourse.nodered.org/t/beaglebone-green-wireless-gateway/47737/2 "2021-06-28T09:13:49Z")

</div>

Do you have latest node-red?

You could enable `functionExternalModuels` (see [Function node use of npm modules](https://discourse.nodered.org/t/node-red-1-3-0-beta-1-released/41960)) then add references to `johnny-five` and `beaglebone-io` in the setup tab of the function node. Then you write a function like so...

```auto
var five = require('johnny-five');
var BeagleBone = require('beaglebone-io');

var board = new five.Board({
    io: new BeagleBone()
});

board.on('ready', function () {
    // connect a Led on pin P9_14 of the beaglebone
    var led = new five.Led('P9_14');
    led.blink(1000);
    // this allows access to the led while the program is running
    this.repl.inject({ led: led });
});

```

See here for more info: [Starting with Johnny-Five on the BeagleBone - MORPHOCODE](https://morphocode.com/starting-with-johnny-five-on-the-beaglebone/)

---

<div class="post-metadata">

### Author: ![Aivaras](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@Aivaras](https://discourse.nodered.org/u/Aivaras)
#### Post date: [28 June 2021 12:12 UTC](https://discourse.nodered.org/t/beaglebone-green-wireless-gateway/47737/3 "2021-06-28T12:12:59Z")

</div>

Thank you for information Steve.

Yes, I am using latest node-red version.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 August 2021 12:13 UTC](https://discourse.nodered.org/t/beaglebone-green-wireless-gateway/47737/4 "2021-08-27T12:13:10Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
