FYI, I started a wiki page for esp8266 design notes: https://github.com/espruino/Espruino/wiki/ESP8266-Design-Notes
@Gordon how & when would you like to handle merging my esp8266 fork back into mainline? There are a number of things still on my todo list:
I plan to spend significant time on this this week-end, but I'll be working very little (if any) on it this coming week. Dunno whether you want to sync up. Of course anyone can merge my fork to their fork or mainline anytime.
@tve are you coordinating with @Kolban? I hope you are, since he's simultaneously doing work to support esp8266... It'd be no fun of you were both doing the same things, or if your work and his work were conflicting.
My feeling (Not sure if Gordon agrees, but I think he's said things to that effect) is that you should pull request often, since there's another person working on that, and Esp on the ESP is not in a release ready state yet anyway, so there's nothing to break
Since the merge a week when the work @blaz had started was merged into the single Espruino github repository, everything I have been working on since that time has been against an issue (see https://github.com/espruino/Espruino/issues) and when worked upon to a state where it was unit tested and (to the best of my ability) not regressed anything, a pull request was issued against the master waiting for @Gordon to approve and issue a merge. Because I am now working against the Espruino master repository, I have benefited by being able to pull the latest work performed by others and also pushed into the repository.
I'd suggest that what you probably want to do is create an issue for each area you have addressed, merge the code changes for each issue (one at a time) ... and created as many issue specific pull requests as needed. There may already be issues that already exist that you might want to look at to do work against. For example, there is an issue for getting GPIO settings right, an issue for getting the new code formatting correct and others.
I also recommend creating issues even if you aren't ready to work on them immediately. A lot of the issues have notes and comments and design proposals already in them.
Pull request created: https://github.com/espruino/Espruino/pulls
I'm gonna take a little bit of a break on the esp8266 and see how much promise the emw3165 holds. The crappy SDK and HW in the esp8266 has gotten at me, plus I just received an emw3165 WifiMCU...
Thanks! I'll pull it in today and try and answer those questions
Wow, thats very cool!!! I just ordered an esp8266 to try it using js!
If I pressed save on esp8266 board, and then I cannot use the board again couse it resets, how can I flash a working js code again?
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
load 0x40100000, len 30648, room 16
load 0x3ffe8000, len 2108, room 0
ho 0 tail 12 room 4
load 0x3ffe8840, len 28804, room 12
Øïsys=70011 rtc=3649716yrl§Loading -491521 bytes from flash...
See thread here:
Tonight I had a few hours to try the ESP-01 port of Espruino. I think the firmware upload succeeded (from this source : https://github.com/espruino/EspruinoBuilds/tree/master/ESP8266). I flashed the binaries at 0x00000, 0x10000, as well as the script (main.js) at 0x60000, but after a reset (as well as GPIO0 released), I got bad news: ESP-01 sent me
"ets Jan 8 2013,rst cause:1, boot mode:(3,0)
I read on a forum that this is probably that the ESP did not find any application code to run.
Did you ever had to deal with this issue?
(the build date is "Build 2015-10-25 6:02pm CT" )
Howdy ... have a look at this video and see if it matches close to what you tried ... see:
There is a quite active live chat on Espruino (and Espruino on ESP8266) here https://gitter.im/espruino/Espruino where there may be folks who can assist live.
OK now it works. I think the espruino_esp8266_board_0x10000.bin was not the one I needed, moreover it seems that it is an exact copy of espruino_esp8266_board_0x00000.bin (at least the size is the same). Instead, I used the binaries that I found in the ZIP file (https://github.com/espruino/EspruinoBuilds/blob/master/ESP8266/espruino_esp8266_board_binaries.zip), and it works like a charm!
Thank you Kolban for your help :-)
Is there any getting started guide for using WiFi on the ESP8266 as the Espruino? Instructions on how to connect and use the WiFi API aren't immediately obvious and I've had to troll through the docs to just find and information, and I couldn't find any examples. Apologies if I'm just silly and can't find the information. It's amazing work you've all done.
Have a look at the following and see if this helps ...
If that doesn't completely answer your questions, PLEASE post back so that we can address by making those docs clearer.
Hmm, I get
WARNING: Module "wifi" not found
WARNING: Module "ESP8266" not found
Howdy Ducky ... this warning can be found as a tracked issue here:
Wow, thanks for your speedy reply. Hmm "arrayOfAcessPoints" is null for me, but perhaps my ESP8266 just isn't detecting any networks.
Also, Uncaught ReferenceError: "esp8266" is not defined for esp8266.getAddressAsString -- Fixed by replacing esp8266.getAddressAsString with ESP8266WiFi.getAddressAsString, maybe change the doc?
What level of the firmware are you using? The docs "should" match the latest firmware.
Live chat is available here if needed ...
That was 1v81.705 on a NodeMCU ESP-12
I tried the following and it seemed to work ... can you try same?
var esp8266 = require("ESP8266");
the wifi.scan() method has been updated recently. the previous callback prototype was "function(aps,...)" ans is now "function(res,aps,...)". You may have to use the second parameter instead of the first one, to work on given ssid list
Is there any documentation about how to compile Espruino for Esp8266? I would like to include some extra library to the framework, like RcSwitch...
You could copy everything to an ubuntu-vm from @tve server:
git clone https://github.com/tve/Espruino.git
curl -Ls http://s3.voneicken.com/xtensa-lx106-elf.tgx | tar Jxf -
curl -Ls http://s3.voneicken.com/esp_iot_sdk_v1.5.0.tgx | tar Jxf -
next assign variables:
ESP8266SDK_ROOT needs to be set to esp_iot_sdk....
and xtensa-lx106.... is appended to path
last not least cd to Espruino folder and:
Although have you checked out the existing 433Mhz stuff on the website? There's already quite a bit there for controlling 433Mhz devices from JS
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem