title: Adafruit ultimate gps breakout v3 with beaglebone black using johnny-five and beaglebone-io dependencies
body: <p>I am following a sample demo from J5 (<a href="http://johnny-five.io/examples/gps/" rel="nofollow noreferrer">http://johnny-five.io/examples/gps/</a>) where they use an arduino to communicate with the Adafruit module. In my case, I am using a Beaglebone black and I adapt this code with the official dependency called beaglebone-io (<a href="https://www.npmjs.com/package/beaglebone-io" rel="nofollow noreferrer">https://www.npmjs.com/package/beaglebone-io</a>).</p>
  <p>But i got this error:</p>
  <pre><code>1648574209682 Available BeagleBone-IO 
  1648574209720 Connected BeagleBone-IO 
  1648574209756 Repl Initialized 
  &gt;&gt; /home/debian/Desktop/devel/iot/node_modules/linux-io/lib/linux-io.js:93
        throw new Error('Mode ' + mode + ' is not supported');
        ^
  
  Error: Mode undefined is not supported
      at BeagleBone.LinuxIO.pinMode (/home/debian/Desktop/devel/iot/node_modules/linux-io/lib/linux-io.js:93:13)
      at /home/debian/Desktop/devel/iot/node_modules/johnny-five/lib/gps.js:271:17
      at Array.forEach (&lt;anonymous&gt;)
      at GPS.initialize (/home/debian/Desktop/devel/iot/node_modules/johnny-five/lib/gps.js:269:18)
      at new GPS (/home/debian/Desktop/devel/iot/node_modules/johnny-five/lib/gps.js:247:12)
      at Board.&lt;anonymous&gt; (/home/debian/Desktop/devel/iot/testGps.js:18:13)
      at Board.emit (events.js:326:22)
      at /home/debian/Desktop/devel/iot/node_modules/johnny-five/lib/board.js:428:39
      at processTicksAndRejections (internal/process/task_queues.js:79:11)
  </code></pre>
  <p>I navigated through the dependencies files found on github and i couln't found any clue.</p>
  <p>Any ideas ?</p>
  <p>Here is my code:</p>
  <pre><code>const { Board, GPS } = require(&quot;johnny-five&quot;);
  const BeagleBone = require('beaglebone-io');
  
  const board = new Board({
          io: new BeagleBone()
  });
  
  board.on(&quot;ready&quot;, () =&gt; {
  
    /*
     * This is the simplest initialization
     * We assume SW_SERIAL0 for the port
     */
  
    var gps = new GPS({
          pins: { rx: 'P9_26', tx: 'P9_24' }
    });
  
    // If latitude, longitude change log it
     gps.on(&quot;change&quot;, position =&gt; {
      const {altitude, latitude, longitude} = position;
      console.log(&quot;GPS Position:&quot;);
      console.log(&quot;  latitude   : &quot;, position.latitude);
      console.log(&quot;  longitude  : &quot;, position.longitude);
      console.log(&quot;  altitude   : &quot;, position.altitude);
      console.log(&quot;--------------------------------------&quot;);
    });
  
    // If speed, course change log it
    gps.on(&quot;navigation&quot;, velocity =&gt; {
      const {course, speed} = velocity;
      console.log(&quot;GPS Navigation:&quot;);
      console.log(&quot;  course  : &quot;, course);
      console.log(&quot;  speed   : &quot;, speed);
      console.log(&quot;--------------------------------------&quot;);
    });
  
  });
  </code></pre>