-
I got my ESP8266 on tuesday.
First problem was powersupply of 3.3V, which cannot be solved by Espruino board.
Had to wait 2 more days to get an regulator.
Things working in a module, something like pre-alpha status is:- reset
- connect to my wifi at home
- read ip, this was a complex part, at the end a 10 sec delay made it more reliable
- get data from my local server using IP-address (192.168.1....)
- get data from http://www.espruino.com, there might be undetected problems with DNS
Next step will be to get data from subdirectory on server, the example I found looks strange to me, so lets wait and see.
Main problems I ran into are: - esp8266 returns commands first, before sending requested information (like getIP)
- in console.log I often get double charaters (like esspruino.com instead of given espruino)
- its hard to recognize end of data comin from esp8266, (e.g. whats the end of get data, could be "OK\r\nOK\r\n", but need more testing
- didn't find a command to setIP
- DNS is hardcoded, according to some information I found
All together its a 3.50€ chip and I got a lot working in short time. Reliability is not a question as long as I still have to get functions like "get Data from url" up and running. And last not least, status of coding is something like pre-alpha.
- reset
-
-
-
It doesn't fit in flash anymore is a bad limitation.
Specific compiled version like the WIZnet could be an option. Bad side of the medal is grow in maintenance.
I wonder if there could be a way to load additional precompiled modules into flash, something like requireASM("CC3000")
This way we could have a base Espruino, and a lot of additional modules. Optional modules (from my point of view) could be:- CC3000 (including WLAN and all of http...)
- WIZnet(including WLAN and all of http...)
- debug (sizeOf,...)
- ESP8266(including WLAN and all of http...)
- fs + File
- FFT and others
- CC3000 (including WLAN and all of http...)
-
-
My 2 cents :-)
TI got a chance to sell a product. This failed because of bad support and ignoring problems. Why should somebody try again immeadiately. The ball is in their hand now, to change behavior.
In the meantime its a good idea to test other options. One more reason is the price, if Gordon gets the ESP8266 up and running, this will be a better choice than (potentially) wasting more time with TI tools. -
Got it running by moving code-part of functions getArea and between into calcGesture. Now it is this:
function gesture(trig,echo){ function Empty(){} function gestureArea(min,max){this.min = min;this.max = max;this.active = true;} function trigger(){ digitalPulse(trig, 1, 0.01); } var riseTime = 0,fallTime = 0,iv,ivDef = 50,clkDef = 0.15; var min = 10,max = 100,actArea = "",prevArea = "",lastEnter = 0; var callback = {enter:Empty,leave:Empty,click:Empty,move:Empty}; var areas = {}; this.setRange = function(mn,mx){min = mn;max = mx;}; this.setCallback = function(t,f){callback[t] = f;}; this.addArea = function(name,min,max){ areas[name] = new gestureArea(min,max); }; this.setAreaStatus = function(name,status){ areas[name].active = status; }; this.start = function(t){ ivDef = t || 50; clkDef = ivDef * 3 / 1000; iv = setInterval(function(){trigger();},ivDef);}; this.stop = function(){clearInterval(iv);}; function calcGesture(d){ var a = "",i; if(d > min && d < max){ for(i in areas){ if(areas[i].active){ if(d > areas[i].min && d < areas[i].max){ a = i; } } } if(a){ if(actArea === a){ a = areas[a]; callback.move("move",actArea,d,(d - a.min) / (a.max - a.min) * 100); } else{ if(actArea !== ""){ callback.leave("leave",actArea,d); } callback.enter("enter",a,d); lastEnter = fallTime; prevArea = actArea;actArea = a; } } else{prevArea = actArea;actArea = "";} } else{ if(actArea){ callback.leave("leave",actArea,d); if((fallTime - lastEnter) < clkDef){ callback.click("click",actArea,d); } } prevArea = actArea; actArea = ""; } } setWatch(function(e){riseTime = e.time;},echo,{repeat:true, edge:'rising'}); setWatch(function(e){ fallTime = e.time; calcGesture(((fallTime - riseTime) * 1000000)/ 57); },echo,{repeat:true, edge:'falling'}); } var g = new gesture(A0,A1); g.addArea("bottom",10,20); g.addArea("middle",30,40); g.addArea("top",50,60); //g.setCallback("enter",function(a,t,d){console.log(a,t,d);}); //g.setCallback("leave",function(a,t,d){console.log(a,t,d);}); g.setCallback("click",function(a,t,d){console.log(a,t,d);}); //g.setCallback("move",function(a,t,d,p){console.log(a,t,d,p);});
looks like Espruino does not like the construction to abort the loop.
a:{for(b in d)if(d[b].active&&a>d[b].min&&a<d[b].max)break a;b=""}
-
May be, this Indiegogo-Project becomes another option
https://www.indiegogo.com/projects/xwifi-a-fingertip-sized-wifi-module-open-source#home -
-
I'm developing a module to recognize simple gestures based on hc-sr04.
Code runs fine, but minified(simple optimization) runs into error, somewhere around calcGesture.function gesture(trig,echo){ function Empty(){} function gestureArea(min,max){this.min = min;this.max = max;this.active = true;} function trigger(){ digitalPulse(trig, 1, 0.01); } var riseTime = 0,fallTime = 0,iv,ivDef = 50,clkDef = 0.15; var min = 10,max = 100,actArea = "",prevArea = "",lastEnter = 0; var callback = {enter:Empty,leave:Empty,click:Empty,move:Empty}; var areas = {}; this.setRange = function(mn,mx){min = mn;max = mx;}; this.setCallback = function(t,f){callback[t] = f;}; this.addArea = function(name,min,max){ areas[name] = new gestureArea(min,max); }; this.setAreaStatus = function(name,status){ areas[name].active = status; }; this.start = function(t){ ivDef = t || 50; clkDef = ivDef * 3 / 1000; iv = setInterval(function(){trigger();},ivDef);}; this.stop = function(){clearInterval(iv);}; function calcGesture(d){ var a; if(between(min,max,d)){ a = getArea(d); if(a){ if(actArea === a){ a = areas[a]; callback.move("move",actArea,d,(d - a.min) / (a.max - a.min) * 100); } else{ if(actArea !== ""){ callback.leave("leave",actArea,d); } callback.enter("enter",a,d); lastEnter = fallTime; prevArea = actArea;actArea = a; } } else{prevArea = actArea;actArea = "";} } else{ if(actArea){ callback.leave("leave",actArea,d); if((fallTime - lastEnter) < clkDef){ callback.click("click",actArea,d); } } prevArea = actArea; actArea = ""; } } function getArea(d){ for(var a in areas){ if(areas[a].active){ if(between(areas[a].min,areas[a].max,d)){ return a; } } } return ""; } function between(min,max,value){return (value>min && value<max);} setWatch(function(e){riseTime = e.time;},echo,{repeat:true, edge:'rising'}); setWatch(function(e){ fallTime = e.time; calcGesture(((fallTime - riseTime) * 1000000)/ 57); },echo,{repeat:true, edge:'falling'}); } var g = new gesture(A0,A1); g.addArea("bottom",10,20); g.addArea("middle",30,40); g.addArea("top",50,60); //g.setCallback("enter",function(a,t,d){console.log(a,t,d);}); //g.setCallback("leave",function(a,t,d){console.log(a,t,d);}); g.setCallback("click",function(a,t,d){console.log(a,t,d);}); //g.setCallback("move",function(a,t,d,p){console.log(a,t,d,p);});
-
The actual version of WebIDE on github has a new plugin, which draws line charts based on feedback from Espruino board.
In the background it uses setInterval to console.log an object with actual data, which is captured by WebIDE and sent/displayed to charting tool.
You have to activate "testing" in options. There are two tours under help button to give a first introduction. Any feedback, since this is a complex function, would be fine. -
There is another source
http://www.ibuyla.com/product/40501827428/
All documentation is in chinese right now, so it would be challenging to get a driver running.
I would like this little thing.
One more source (for $4,34)
http://www.88im.com/Item/40484626466 -
-
This needs to be fixed in file.js.
Filewriter used there does not change size of existing file.//writer.write(new Blob([convertToOS(data)], { type: "text/plain" })); old code var bb = new Blob([convertToOS(data)],{ type: "text/plain"} )); writer.truncate(bb.size); setTimeout(function(evt){ //make sure, truncate is done before writing fileWriter.seek(0); //needed only in special cases fileWriter.write(bb); },200);
-
-
-
Just tested latest build(http://www.espruino.com/binaries/git/commits/8e7aac987b82d5843face571789fdab1e2c6cc5b/espruino_1v70_espruino_1r3.bin) with this:
var l = false,led = LED1; setInterval(function() { l = !l; led.write(l); }, 1500);
And got Uncaught Error: Field or method does not exist.....
May be an "older bug". I did not test for some time. -
A lot of good and interesting things have been done for Espruino.
But who knows ?
If you take a look to Espruino Pages, you will not recognize any remarkable change.
There is no "whats new", no "upcomin features", interesting folders(binaries, modules, ..) don't have a link, lots of pages are the same since 2012 and don't reflect major changes, link to store is in the hidden part at the end of startpage, etc.etc..
Espruino is a big and powerful tool. Development and support, everything technical, is absolutely great.
It would deserve(needs) better presentation to become a commercial success. -
-
Projects are a plugin for WebIDE.
I created a pullrequest some time ago, and Gordon merged it on github.
To be honest, I never checked the app itself from the store :-)Under help should be a new button for project which gives a first introduction.
Projects support a local folder, which is assigned to the webapp.
Subfolders for projects, modules and binaries are available.
Projects is a simple folder to handle js-files.
Modules are searched in local folder first, before searching in the internet.
Binaries hold compiled assembler codeI'm still working on this to add functions like
- send modules from local folder to sdCard on Espruino
- send binaries (compiled assembler) to sdCard
- send images (bmp format) to sdCard
- send modules from local folder to sdCard on Espruino
-
-
I'm searching for a cheap WIFI solution capable for Espruino.
Taking the "money only" view, there are 10€ USB sticks available.
On the other hand solutions for Arduino(and other boards) are around 30€.
Last not least the CC3000 is a kind of ...... special.Carambola 2 could be a good choice, thanks for pointing me into this direction.
-
Are there any news about the stretchgoal for 70.000 ?
There is a nice project on IndieGoGo, I'm thinking about. -
@Gordon, could you please give some more information to this
It'll be pretty easy to stick the Adafruit Wifi dongle on though. You should be able to solder it straight on.
Is it for the new board only, and which dongle do you have in mind ?BTW, does anybody have some experience with HLK-RM04 Serial Port-Ethernet-Wi-Fi Adapter
Hello Gordon,
I created my own module in Javascript. Main reason was to get my hands on. As soon as Espruino supports this, I will switch.
Regulator would have been helpful, but I did not get it quickly, so I ordered another one (LF33CV) which has different layout. I added capacitor on input and output.
I'm unsure about DNS. Just tried to read /modules/servo.js from Espruino.com and got a 404.
Reading / from Espruino.com at least returns something, but it is not your homepage.
Reading a file in subdirectory from a server in my home network, using (192.168.1.3) works fine.