Shop OBEX P1 Docs P2 Docs Learn Events
ESP8266 BASIC - just when you thought you were safe with LUA and Arduino... — Parallax Forums

ESP8266 BASIC - just when you thought you were safe with LUA and Arduino...

I just stumbled across this little gem, haven't tried it yet.


BASIC Interpreter for ESP2866


Now there's no reason not to hook up an ESP8266 to you Propeller or BASIC Stamp (maybe?)!! :)

Go forth and play!! (no, not that GO or that Forth)


Comments

  • I've been looking at using the Sparkfun ESP8266 Thing Dev module as a Wi-Fi PropPlug. Looks like it should be able to handle it and it only costs $17. Actually, if I get the code to work a cheaper module would be possible as this "dev" module has an FTDI chip that is only really needed for development.
  • $17, isn't that kind of pricey in today's world of ESP8266 and C.H.I.P. boards and Pi-Zeros??

    I can't go over $16.99 :D
  • mindrobots wrote: »
    $17, isn't that kind of pricey in today's world of ESP8266 and C.H.I.P. boards and Pi-Zeros??

    I can't go over $16.99 :D
    Touché
  • Actually, I think someone should port Micromite BASIC to the ESP8266. It's much more complete.
  • David Betz wrote: »
    mindrobots wrote: »
    $17, isn't that kind of pricey in today's world of ESP8266 and C.H.I.P. boards and Pi-Zeros??

    I can't go over $16.99 :D
    Touché

    All of you should see the <DELETED!> cheap boards using that thing available from Micro Center. If you thought that price was low, they want around six to seven dollars for them.
    ----
    That's odd, Erco your robot was seen boarding a bus in the PA Bus Terminal in Times Square.

  • David Betz wrote: »
    mindrobots wrote: »
    $17, isn't that kind of pricey in today's world of ESP8266 and C.H.I.P. boards and Pi-Zeros??

    I can't go over $16.99 :D
    Touché

    All of you should see the <DELETED!> cheap boards using that thing available from Micro Center. If you thought that price was low, they want around six to seven dollars for them.
    ----
    That's odd, Erco your robot was seen boarding a bus in the PA Bus Terminal in Times Square.
    I have a few of those really cheap ones too but this ESP8266 Thing Dev module from Sparkfun is easier to program because it has an onboard FTDI chip. I'll try the cheaper ones once I get the software working.

  • David Betz wrote: »
    I've been looking at using the Sparkfun ESP8266 Thing Dev module as a Wi-Fi PropPlug. Looks like it should be able to handle it and it only costs $17. Actually, if I get the code to work a cheaper module would be possible as this "dev" module has an FTDI chip that is only really needed for development.

    I found that the ESP8266-11 works well & is easier to connect in a single header configuration. I solder the module to half of a SO-16 adapter. See the attached image.

    ESP8266-11 found on eBay @ US $3.21: http://www.ebay.com/itm/1pcs-ESP8266-Serial-Port-Remote-WIFI-Wireless-Transceiver-8266-Module-Esp-11-/391087262116?hash=item5b0e9e09a4:g:5RAAAOSw-7RVCR31


    dgately
    1797 x 2080 - 621K
  • dgately wrote: »
    David Betz wrote: »
    I've been looking at using the Sparkfun ESP8266 Thing Dev module as a Wi-Fi PropPlug. Looks like it should be able to handle it and it only costs $17. Actually, if I get the code to work a cheaper module would be possible as this "dev" module has an FTDI chip that is only really needed for development.

    I found that the ESP8266-11 works well & is easier to connect in a single header configuration. I solder the module to half of a SO-16 adapter. See the attached image.

    ESP8266-11 found on eBay @ US $3.21: http://www.ebay.com/itm/1pcs-ESP8266-Serial-Port-Remote-WIFI-Wireless-Transceiver-8266-Module-Esp-11-/391087262116?hash=item5b0e9e09a4:g:5RAAAOSw-7RVCR31


    dgately
    Do you know if all of these ESP8266 modules have the same amount of flash and SRAM? It seems like my Sparkfun ESP8266 Thing Dev module has about 512k of flash and 96k of SRAM. With the TCP/IP and WiFi stack loaded, it still seems to have over 200k of flash available. That should certainly be enough for a Propeller loader.

  • dgatelydgately Posts: 1,630
    edited 2015-12-10 18:25
    Do you know if all of these ESP8266 modules have the same amount of flash and SRAM? It seems like my Sparkfun ESP8266 Thing Dev module has about 512k of flash and 96k of SRAM. With the TCP/IP and WiFi stack loaded, it still seems to have over 200k of flash available. That should certainly be enough for a Propeller loader.

    The ESP8266 Wiki page has lots of info, though I did not find memory maps for each specific module type: http://www.esp8266.com/wiki/doku.php?id=start


    BTW: check this link about ESP8266 Basic: esp8266.com/wiki/doku.php?id=esp8266basic

    dgately
  • I might. Every time I want to buy a couple of the pests, they can not be found. And their associate who supposedly loves helping me is also frustrated. Which is a big downer over there........
  • jmgjmg Posts: 15,173
    David Betz wrote: »
    Do you know if all of these ESP8266 modules have the same amount of flash and SRAM? It seems like my Sparkfun ESP8266 Thing Dev module has about 512k of flash and 96k of SRAM. With the TCP/IP and WiFi stack loaded, it still seems to have over 200k of flash available. That should certainly be enough for a Propeller loader.

    One of the threads above, talks about issues with what one user thought had more flash...
    Seems some grey market creep is out there, from less than honest vendors.

    SRAM is in the device, FLASH is boot flash, like P1/P2 & seems to vary as above.

    http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family

    Mentions Winbond W25Q32, which is a 32Mbit=4MByte device ?
    Could cache the Prop code, and allow simple re-flash with no link ?
    (thinking more of P2 than P1)
  • jmg wrote: »
    David Betz wrote: »
    Do you know if all of these ESP8266 modules have the same amount of flash and SRAM? It seems like my Sparkfun ESP8266 Thing Dev module has about 512k of flash and 96k of SRAM. With the TCP/IP and WiFi stack loaded, it still seems to have over 200k of flash available. That should certainly be enough for a Propeller loader.

    One of the threads above, talks about issues with what one user thought had more flash...
    Seems some grey market creep is out there, from less than honest vendors.

    SRAM is in the device, FLASH is boot flash, like P1/P2 & seems to vary as above.

    http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family

    Mentions Winbond W25Q32, which is a 32Mbit=4MByte device ?
    Could cache the Prop code, and allow simple re-flash with no link ?
    (thinking more of P2 than P1)
    Interesting. So you think that the ESP8266 executes code directly out of qSPI flash?

  • jmgjmg Posts: 15,173
    David Betz wrote: »
    Interesting. So you think that the ESP8266 executes code directly out of qSPI flash?

    I've not dug that deep, but I think the native code loads into SRAM and executes from there.

    Of course once you add scripts and languages, (like this Basic Interpreter) things blur and byte-code can come from almost anywhere..

    I can see extra flash is always going to be useful and the incremental cost of adding that is falling.
    W25Q32 sounds like quite a useful size. Would hold a P2 image in one corner....
  • Heater.Heater. Posts: 21,230
    What, you mean they don't have Javascript on there yet.

    Wake me up when it's ready.
  • If I compile a relatively small program that uses the WiFi and TCP/IP stack, this is what I get:
    Sketch uses 219,680 bytes (50%) of program storage space. Maximum is 434,160 bytes.
    Global variables use 34,058 bytes (41%) of dynamic memory, leaving 47,862 bytes for local variables. Maximum is 81,920 bytes.
    
    Looks like there is about 512k of program memory and over 80k of RAM. This is C code so there is no interpreter involved.
  • Looks like one advantage of this Basic is that you can program the ESP8266 wirelessly using any device that has a web browser (like an iPad or iPhone!)
  • Heater. wrote: »
    What, you mean they don't have Javascript on there yet.

    Wake me up when it's ready.

    Then better wakeup: https://github.com/espruino/EspruinoBuilds/tree/master/ESP8266
  • Heater.Heater. Posts: 21,230
    rosco,

    Ha, I just woke up and that's the first thing I read. What a great start to the day.

    Thanks.

  • You're welcome :D

    It's pretty old news by now. Thought you already knew :) I believe it was even discussed here in the forums already
  • Hi

    Had a look at the github and.....

    The command to flash the device is:


    esptool -bm qio -bz 512K -bf 40 -cp COM14 -cb 115200 -cd nodemcu -ca 0x00000 -cf "boot_v1.4(b1).bin" -ca 0x1000 -cf espruino_esp8266_user1.bin -ca 0x7E000 -cf blank.bin

    Make sure to change the COM port to match your own. The COM port is supplied with the -cp flag parameter.

    I presume this is a command line entry - do you, in this day and age, actually have to laboriously type that all in, not making any mistakes or is it possible to just cut and paste?

    Dave
  • Heater.Heater. Posts: 21,230
    I seem to recall reading about Eprunino for the ESP8266. I got the impression it was a still a work in progress. Or I'm getting forgetful.

    Normally one would copy and paste a command like that. Perhaps in two goes as it might have a line break in there. Then edit the com port and boom it's done.

    If you need to do it a gain it's in the command history. Just hit up arrow an RETURN.

    If you think you might need to do it again in the future jut past it into a script. And then:

    $ ./blowIt.sh

    All in all much easier than messing with any GUI interface for such things :)

  • I use ESP-01's, ESP-07's and ESP-12e's

    My favourite are the 12e's as they have the largest installed flash, and more pins

    01's are great for quick&dirty when you don't need a lot of I/O

    07's are for longer range comms with an external antenna

    So far, I have been mostly using them with the Arduino port, and with Lua.

    My ESP-01 dev board:

    http://www.mikronauts.com/esp8266/esp8266-esp-01-module-experiments/
  • Nice! I just ordered a couple of your boards. Is there any reason you used the larger prototyping board? Seems like the circuit would fit on the smaller one.
  • Bill HenningBill Henning Posts: 6,445
    edited 2016-01-03 05:49
    Thanks - I saw the Tindie order come in.

    I think my freight forwarder's next run to the states (for USPS mailing) will be on Tuesday, so I should have a tracking number then.

    I use the larger prototyping board for larger projects, including Prop projects.

    Here are a couple of my articles using the large board for Pi projects:

    http://www.mikronauts.com/raspberry-pi/raspberry-pi-i2c-eeprom-gang-programmer/

    http://www.mikronauts.com/raspberry-pi/raspberry-pi-analog-to-digital-conversion-experiments-and-howto/

    I also used it for an ESP-01 article:

    http://www.mikronauts.com/esp8266/esp8266-esp-01-module-experiments/

    FYI, the large board also works nicely with QuickStart and all the 4"x3" Propeller boards (and all my 4"x3" Propeller boards)
  • kwinnkwinn Posts: 8,697
    edited 2016-01-03 15:26
    @ Bill Henning

    Took a look at your eeprom programmer article and saw that you wanted to use zif sockets but could not find 8 pin ones. Had the same problem a while back and solved it by using using a "universal" 40 pin socket. They fit both the 0.3" and 0.6" pin spacing of the dip chips, so four 8 pin chips can be loaded in the socket with one space between each chip. In some cases you can even get 5 chips in the socket.

    A socket like this should work well.
  • PublisonPublison Posts: 12,366
    edited 2016-01-03 18:19
    @kwinn

    That's pretty cheap for a ZIP socket! I remember when they used to cost >30 dollars.

    Thanks for the link.
  • kwinnkwinn Posts: 8,697
    Publison wrote: »
    @kwinn

    That's pretty cheap for a ZIP socket! I remember when they used to cost >30 dollars.

    Thanks for the link.

    Yes, it is pretty cheap. IIRC I paid over 40 dollars the last time I bought one.
  • Thanks, I have those... as a matter of fact, after writing that article I bought some ZIF sockets in every size I could find, at least 10 each, for my parts cabinets :)

    I'd prefer to use the 16 pin zif's instead of 40's simply due to lower probability of mis-aligning those 8 pin dips.
    kwinn wrote: »
    @ Bill Henning

    Took a look at your eeprom programmer article and saw that you wanted to use zif sockets but could not find 8 pin ones. Had the same problem a while back and solved it by using using a "universal" 40 pin socket. They fit both the 0.3" and 0.6" pin spacing of the dip chips, so four 8 pin chips can be loaded in the socket with one space between each chip. In some cases you can even get 5 chips in the socket.

    A socket like this should work well.

Sign In or Register to comment.