Avatar for gadicc

gadicc

Member since Feb 2014 • Last active May 2014
  • 2 conversations
  • 16 comments

Most recent activity

    • 13 comments
    • 9,281 views
  • in Projects
    Avatar for gadicc

    I'd say it's doable with a bit of work. You could create a new transport layer over serial (using a node serial module on the Meteor side), and plug into the respective parts on each side. Call a function on the Espruino when sending data, and ensure data comes back via console.log() and is handled accordingly on the Meteor side. It's not simple but definitely doable.

    Quite a weird setup though. It will be permanently tethered to your PC? I'd say if you don't want wifi, but are fine with a cable, make it an ethernet cable :>

    Possibly better handled with a small node app that uses the above approach to accept http connections and forwards them over serial. That has greater application for the general community as a whole too.

  • in General
    Avatar for gadicc

    Yeah I also noticed that you can't export a single class. But the example would be:

    var Date = require('date').connect;
    var d1 = new Date()
    var d2 = new Date()

    :)

    You could also call 'connect' something like '_constructor'.

  • in General
    Avatar for gadicc

    Strange... I've just updated the Web IDE with a hack for this - can you give it a try?

    Oh, awesome! That will be quite a pleasure. Btw, according to the Chrome devs, "ttyACM0" (without leading /dev) is valid and the problem is actually that connect() can't connect to it. Apparently.

    @graf, thanks, didn't realize 34 was stable already. Hopefully that means this might get more attention, although it still quite rare. Would be great if you starred the following bug report, and commented with your distribution, kernel and udev details: https://code.google.com/p/chromium/issue­s/detail?id=354782

  • in General
    Avatar for gadicc

    @graf, are you using Chrome 34? Since you can see the device showing up, flash it from Python, but can't connect with the Web IDE, you might have landed this problem: http://forum.espruino.com/conversations/­532/#11558 (see post #8 down).

    Basically, if the device shows up in the Web IDE as "ttyACM3" and not "/dev/ttyACM3", there's a good chance this is your problem. See my last post in that thread (#15) for a workaround, but it requires a "dev install" from Github. Or use chrome-stable / 33.

  • in Projects
    Avatar for gadicc

    Will give a shout when I do it personally, but as mentioned there are official Pi ARM builds of node now (Meteor is just a node app), and plenty of reports of MongoDB on the Pi too. That's all you need.

    Also, I didn't mention it, but there'll be a 3rd way to run this. If you don't need the Meteor server (e.g. no need for persistent data, only few expected simultaneous connections, and just one Espruino), we can serve the entire Meteor client side framework (~300k minified) from that Espruino's SD card. Wouldn't be my first choice, but an option :>

  • in Projects
    Avatar for gadicc

    The following was quite a nice read, about PiJS, with two great quotes from the author. Looks like it's exactly the same idea as I had, using Meteor to interact with the client, and have a thin app implementing DDP on the Pi. It's a very short blog post, check it out.

    https://www.meteor.com/blog/2013/05/28/p­ijs-embedded-raspberry-pi-apps-in-javasc­ript

    (DDP is Meteor's Distributed Data Protocol, is central to Meteor's reactive ideals, and as you'll see from the article above, very useful for event-driven hardware stuff too).

  • in Projects
    Avatar for gadicc

    I also thought so! My grand home automation master plan is indeed to have Meteor running on a Pi, with lots of Espruino's connecting to it.

    So I looked into this, and it turns out it's not a problem. Although Meteor isn't officially supported on ARM, essentially it's just a node app, and although people struggled to compile node for ARM in the past, it seems that today there are official binaries for the pi just 2 releases behind (v0.10.24). So looks like we're good!

    Incidentally, there is a lot more work in this field than I thought, with Meteor in particular. See e.g. PiJS and enteye, both written in Meteor from what I understand.

  • in Projects
    Avatar for gadicc

    Good point! I updated the README; please let me know if anything isn't clear... I'm very happy if other people get excited about this :)

    P.S. If you update any files in the website directory while Meteor is running, it will refresh the browser automatically. That's normal.

  • in Projects
    Avatar for gadicc

    So, I'm one of the "completely new to microcontroller" people, but I know web development quite well, and thought it would be cool to be able to make reactive web apps that interact with the Espruino:

    https://www.youtube.com/watch?v=Pjbq2yqy­PYM

    Source code: https://github.com/gadicc/espruino-gc-me­teor

    Regrettably this was just a weekend project, to take a break from crazy pressure at work which I have to get back to now, but hope to resume work on it soon. Next release would have an API and server-to-server DDP. Definitely intend to invest more in this as time allows.

    See also: http://www.meteor.com

Actions