Johnny-Five library

Posted on
  • Hi everyone
    Can Espruino work with that or no?

    Thanks

  • Nope, it doesn't...

    What did you want to do with it - run Johnny-Five on a PC and then control Espruino with it, or run it on the Espruino board itself?

  • Run johnny five on a pc and then control Espruino . And I have also found a node module for Espruino but I can't install it .

  • Ahh, ok - well, Johnny-Five could potentially be modified to send JavaScript commands over the serial link rather than the Firmata protocol - in which case it would 'just work' with Espruino. I don't think they've done that yet though.

    Which module did you try and install? There are a few different ones available. The main ones are:

    There's also the command-line tool that I've done, which isn't on NPM yet, but which uses the Web IDE's codebase so will upload a wider variety of code (including compiled code/assembler/etc).

    https://github.com/espruino/espruino-too­ls

  • node-espruino

    Failed at the serialport@1.3.1 install script 'node-gyp rebuild'.
    npm ERR! This is most likely a problem with the serialport package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node-gyp rebuild

  • @polaroid62 You have to write an IO Plugin for Espruino (implements an interface to Firmata), see https://github.com/rwaldron/johnny-five/­wiki/IO-Plugins. There's a template "Board-IO" to adapt.
    @Gordon What about a IO Plugin for Espruino as a stretch goal for the forthcoming Pico++ Kickstarter? Well, I'm dreaming of a slightly bigger Pico with some serious sensors onboard ;-)

  • :) Well, Rick Waldron (one of the J5 creators) already has a bunch of Espruinos, so I'm kind of surprised he hasn't done this already.

    From the look of that page on IO plugins, it'd be dead easy to write one - for output at least you're basically just defining a bunch of functions that look like handler.digitalWrite = function(p,v) { serial.write("digitalWrite("+p+","+v+");­\n").

    I'm not doing another KickStarter - at least until I forget how stressful it is!

  • bigger Pico with some serious sensors onboard

    @Spoki, I feel Espruino listens to a different drum beat... as many other alike enterprises do too - and that is: get a thing done as small as possible and as a component to integrate/combine with alike component as easy as possible. This promises the largest (potential) clientele - for function and for (affordable) price. The same goes for the gazillion sensor (chip) solutions...

    'We' - the Pico Kickstarter backer community - had the opportunity to choose larger or smaller... and smaller was the answer, hence the 0.05" pitch. And look how beautiful a Pico looks with an ESP8266! ...and the little shim makes it happen.

    Therefore, I think optimize an on-demand creation and delivery of shims / carriers dedicated to combinations could be a solution. Yes, there are a lot of combinations, but getting a (passive) shim/carrier going is a pico fraction of what it takes to get an board like Pico going.

  • I'd be interested in doing a 'shim' with spaces for a bunch of different sensors, and maybe holes for an ESP8266.

    ...maybe when the BME680 comes out. That and a gyro/accelerometer/compass would be great.

  • Is that just a BME280 plus the gas sensor? The documentation they have on it is super sparse, but it's got the same pinout as the BME280... Wonder how expensive it will be...

    A gas sensor in such a tiny package is certainly cool, but you only need that functionality in a limited number of use cases, much less than for temp/humidity/pressure

  • I think it's yet to be released - hopefully more info will follow.

    I don't know - I think a lot of people would appreciate an air quality indication. Any kind of weather station, room monitor, environmental sensing would benefit from it - including that one on the Quadcopter in the other thread :)

  • Yeah, definitely the quad copter project in that other thread cries out for a sensor like that. I wonder if it's sensitive enough to do air pollutants, though?

  • Hi! And what about running johny-five in espruino to control a serial connected arduino?

  • You could potentially do that, yes. However Johnny-five itself is probably a bit too big to use on Espruino without a bit of work.

    However I'm not really sure why you'd want to do it?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Johnny-Five library

Posted by Avatar for polaroid62 @polaroid62

Actions