-
-
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/issues/detail?id=354782
-
@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.
-
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 :>
-
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/pijs-embedded-raspberry-pi-apps-in-javascript
(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).
-
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.
-
-
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=Pjbq2yqyPYM
Source code: https://github.com/gadicc/espruino-gc-meteor
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
-
-
Thanks... this is the "latest" bug report I opened on the issue :) https://code.google.com/p/chromium/issues/detail?id=354782
I just wanted to update on an "easyish" workaround for the new IDE. It updates the port list every second, so it's a bit hard to inspect the element and make the changes by hand. But one can open up a JavaScript console and use this code to change/open the port after clicking on the connect icon:
$('ul.port-list').find('[data-port]').eq(0).data('port', '/dev/ttyACM0').click();
As before, this requires using an unpackaged version of the Chrome App (e.g. from github), but it's still more comfortable than editing the source on each new release.
-
-
-
My issue was a different one, but this seems to be the right place to consolidate.
- I pick the correct port, click the connect button, and get "Connect Failed".
- I am in the dialup group, and
picocom --baud 9600 --flow n /dev/ttyACM0
works great - After a while, the red LED comes on and stays lit. But this makes no difference to 1 & 2.
In my case, I found that the problem went away when downgrading from Chrome Beta (34.0.1847.60-1) to Chrome stable (33.0.1750.152-1). Relevant parts from the debug log:
[14715:14715:0315/082109:INFO:CONSOLE(65)] ">>> Connecting", source: chrome-extension://bleoifhkdalbjfbobjackfdifdneehpo/js/espruino_status.js (65) [14715:14715:0315/082109:INFO:CONSOLE(185)] "Set Slow Write = true", source: chrome-extension://bleoifhkdalbjfbobjackfdifdneehpo/js/espruino_serial.js (185) [14715:14715:0315/082109:INFO:CONSOLE(58)] "Unable to open device (connectionInfo=undefined)", source: chrome-extension://bleoifhkdalbjfbobjackfdifdneehpo/js/espruino_serial.js (58) [14715:14715:0315/082109:INFO:CONSOLE(65)] ">>> Connect Failed.", source: chrome-extension://bleoifhkdalbjfbobjackfdifdneehpo/js/espruino_status.js (65)
It turns out, that this is because in chrome beta/34, the device names are being reported without
/dev/
. An easy fix, if you want to run beta, is to use the dev version of Espruino IDE (from github, installed as unpacked), right-click on the port name, inspect the option element, and change the value to include/dev/
. As best I can tell, it's a chrome bug, so probably not worth working around this in EspruinoIDE until we know more (according to the API,getDevices()
should return paths that can be used inconnect()
, and that doesn't seem to be true at the moment). Possibly related to chromium #334698. - I pick the correct port, click the connect button, and get "Connect Failed".
-
Hey Gordon, thanks for the quick response! Exactly the kind of answer I was looking for. Cephdon, that's a surprisingly simple and obvious solution that never even crossed my mind... definitely a good fallback although I think I'm going to try figure this stuff out to greater depth. Will be in touch once my pre-order units arrive :)
-
Hi, I am a total newbie to microcontrollers and am super excited to be receiving my Espruino pre-order soon. I'm an advanced Javascript and Linux user though.
I have electric blinds in my apartment operated with a very simple (and annoying) radio controller. I thought it would be cool to capture it's signals and create a more useful interface.
Any hints on what components I would need to do this, and a general pointer on how to get started? I'm a fast learner and up for the challenge.
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.