Prototype & OOP #279
Replies: 5 comments
-
Posted at 2014-06-11 by konsumer Also, as a sidenote, maybe my light string is funny, but even the regular functional form doesn't seem to work right:
It lights up the first LED in a single color or not at all, and that's it. This is probably related to baude, but maybe should be noted here. Update: I spoke too soon. I updated the firmware, and it worked like a charm.
sets LEDs 1, 2, &3 to red, green, blue. Update 2: It seems my code works great after the update, in it's original form. here is the complete lib,if anybody is interested:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-11 by @gfwilliams Great, thanks for the update! Unfortunately most of the rev 1.3 boards ship with firmware that's 6 months old now, and we've fixed and added a massive amount since then! Out of interest, why didn't you update when you first got the board? Just wondering whether I could have made it more obvious in the Web IDE - obviously it sucks if people's first impressions of Espruino are of something that doesn't quite work correctly! :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-11 by konsumer It was pretty obvious, once I read the docs. I just now had some time to play with it, and pulled it out of a drawer. No fault of the docs, I should have done this, right away. Very impressed. Super-easy to get started. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-11 by konsumer As a complete sidenote, I have a lot of experience with native javascript apps. If you guys are interested, I'd be happy to work on a port of the app to a node-webkit standalone. The benefits would be native file access (save files with actual save-file dialog) and no need for chrome install. Is the chrome-only stuff pretty well separated? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-06-11 by @gfwilliams @mattbrailsford actually started off with a node-webkit app IIRC. If you've got time it'd be very handy as a way to reduce dependency on Chrome's web store (and Google Logins) - especially if the same code + repo could be used for both Chrome and node-webkit. Also, an Android port would be epic. It looks like it might be coming to node-webkit soon... The Web IDE code is at http://www.github.com/espruino/EspruinoWebIDE It should be relatively well separated now - you'd just need to make a new version of Espruino.Core.Serial that used node-serial for comms, and maybe add some abstraction for load/save file and chrome's configuration stuff. My ultimate goal would be to allow the Web IDE to be served up from the SD card by Espruino itself :) any changes to make the IDE less dependent on Chrome would really help with that. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2014-06-11 by konsumer
I am pretty used to Javascript OOP prototypical programming, but am brand new to Espruino & having some issues. I am making a WS2811 lib, to get my feet wet with Espruino.
I get this:
ERROR: Constructor should be a function at line 1 col 6.
If I change the constructor to another form:
I get:
ERROR: Function not found! Skipping. at line 1 col 13
What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions