Shop OBEX P1 Docs P2 Docs Learn Events
Low cost wifi module ESP8266 - Page 14 — Parallax Forums

Low cost wifi module ESP8266

11214161718

Comments

  • Cluso99 wrote: »
    I liked the little work I did with lua on the esp8266. Was quite easy.

    Wonder how much code a cut down lua would require on the P1? We could always try a P1V with more hub ram on a bemicro cv-a9. IIRC Roger did the auto incrementing for RDLONG which would double the LMM loop speed.
    I doubt that LMM or CMM would work on a real P1 because there would be too little code/data space. I'm actually worried that even P2 might have trouble since the code density of Propeller code isn't particularly high and 512K is still pretty constrained compared with the code space available on the ESP8266. The good news is that there is a lot more RAM on the P2 than on the ESP8266 which I believe is limited to around 40K.

  • yetiyeti Posts: 818
    edited 2016-07-11 04:32
    David Betz wrote: »
    Yes, NodeMCU looks pretty interesting and Lua looks like a nice language. I wonder how well it would port to the Propeller?
    Already done... Catalina contains Lua.
    This directory contains Lua (a scripting language) for Catalyst/Catalina.

    Lua requires a Propeller platform with an SD card and 512kb of XMM memory.
    I don't see C3+Synapse mentioned in Catalina_3.13.2/target ... so my only Propeller board with the right amount of XMM seems not to be supported by Catalina.
  • MJBMJB Posts: 1,235
    David Betz wrote: »
    Cluso99 wrote: »
    I liked the little work I did with lua on the esp8266. Was quite easy.

    Wonder how much code a cut down lua would require on the P1? We could always try a P1V with more hub ram on a bemicro cv-a9. IIRC Roger did the auto incrementing for RDLONG which would double the LMM loop speed.
    I doubt that LMM or CMM would work on a real P1 because there would be too little code/data space. I'm actually worried that even P2 might have trouble since the code density of Propeller code isn't particularly high and 512K is still pretty constrained compared with the code space available on the ESP8266. The good news is that there is a lot more RAM on the P2 than on the ESP8266 which I believe is limited to around 40K.

    it shouldn't be long until the esp32 with much more RAM and dual core will be out. This would really be a platform for bigger Lua programms then.
  • MJBMJB Posts: 1,235
    yeti wrote: »
    David Betz wrote: »
    Yes, NodeMCU looks pretty interesting and Lua looks like a nice language. I wonder how well it would port to the Propeller?
    Already done... Catalina contains Lua.
    This directory contains Lua (a scripting language) for Catalyst/Catalina.

    Lua requires a Propeller platform with an SD card and 512kb of XMM memory.
    I don't see C3+Synapse mentioned in Catalina_3.13.2/target ... so my only Propeller board with the right amount of XMM seems not to be supported by Catalina.
    I am happy with the speed of Tachyon, don't think XMM Lua will be much faster ;-)
  • Heater.Heater. Posts: 21,230
    Hmm...the ESP8266 has 64 KiB of instruction RAM, 96 KiB of data RAM. Pretty puny compared to the P2.

    Then it supports gobs of external QSPI flash which I presume is where ones Lua code ends up. Isn't it so that the P2 can suuport QSPI as well.

    Lua is great and all but I'm looking to get Javascript working on the P2. Either the Espruino JS engine http://www.espruino.com/ or the new JS engine from Samsung, Jerryscript, https://github.com/Samsung/jerryscript

    Espruino runs on Nordic Semiconductor's nRF52832 with 64kB of RAM and 512kB of Flash or the STM32F103RCT6 with only 256KB of Flash memory and 48KB of RAM, so I'm optimistic that we can fit JS into the P2.

    Now where is that P2 C compiler....?
  • yetiyeti Posts: 818
    edited 2016-07-11 08:15
    MJB wrote: »
    it shouldn't be long until the esp32 with much more RAM and dual core will be out. This would really be a platform for bigger Lua programms then.
    ESP32 already is real, has an own SDK and a forum...

    Some ESP32s already could be ordered in the wild wild web up to a few days ago.
  • MJBMJB Posts: 1,235
    yeti wrote: »
    MJB wrote: »
    it shouldn't be long until the esp32 with much more RAM and dual core will be out. This would really be a platform for bigger Lua programms then.
    ESP32 already is real, has an own SDK and a forum...

    Some ESP32s already could be ordered in the wild wild web up to a few days ago.
    Note:
    this product is pre order of goods,
    Please buyers after the purchase,
    Please buyers Extended delivery time of 60 days,
    Our preparation time within 60 days,
    After careful consideration of the purchase if the buyer! ! !


    First of all
    We need to explain!
    ESP-32 chip is currently no mass production.
    Therefore, we emphasize in the product, which is a pre-order product.
    We expected around June can be shipped.

  • Heater.Heater. Posts: 21,230
    edited 2016-07-11 08:54
    Well, it's July isn't it. Time to get that order in!
  • David BetzDavid Betz Posts: 14,511
    edited 2016-07-11 09:37
    Heater. wrote: »
    Hmm...the ESP8266 has 64 KiB of instruction RAM, 96 KiB of data RAM. Pretty puny compared to the P2.

    Then it supports gobs of external QSPI flash which I presume is where ones Lua code ends up. Isn't it so that the P2 can suuport QSPI as well.

    Lua is great and all but I'm looking to get Javascript working on the P2. Either the Espruino JS engine http://www.espruino.com/ or the new JS engine from Samsung, Jerryscript, https://github.com/Samsung/jerryscript

    Espruino runs on Nordic Semiconductor's nRF52832 with 64kB of RAM and 512kB of Flash or the STM32F103RCT6 with only 256KB of Flash memory and 48KB of RAM, so I'm optimistic that we can fit JS into the P2.

    Now where is that P2 C compiler....?
    The ESP8266 can execute code out of flash through an on-chip cache. It can run megabytes of code.

  • MJB wrote: »
    yeti wrote: »
    David Betz wrote: »
    Yes, NodeMCU looks pretty interesting and Lua looks like a nice language. I wonder how well it would port to the Propeller?
    Already done... Catalina contains Lua.
    This directory contains Lua (a scripting language) for Catalyst/Catalina.

    Lua requires a Propeller platform with an SD card and 512kb of XMM memory.
    I don't see C3+Synapse mentioned in Catalina_3.13.2/target ... so my only Propeller board with the right amount of XMM seems not to be supported by Catalina.
    I am happy with the speed of Tachyon, don't think XMM Lua will be much faster ;-)
    That is certainly true. XMM will be *much* slower than Tachyon. However, we have lived with the slow performance of Spin and it has still proved useful for a main program with time-critical drivers written in PASM. The same could be true of Lua on a P1. That might make it fast enough for some applications.

  • Cluso99Cluso99 Posts: 18,069
    yeti wrote: »
    David Betz wrote: »
    Yes, NodeMCU looks pretty interesting and Lua looks like a nice language. I wonder how well it would port to the Propeller?
    Already done... Catalina contains Lua.
    This directory contains Lua (a scripting language) for Catalyst/Catalina.

    Lua requires a Propeller platform with an SD card and 512kb of XMM memory.
    I don't see C3+Synapse mentioned in Catalina_3.13.2/target ... so my only Propeller board with the right amount of XMM seems not to be supported by Catalina.

    I run Catalina on my RamBlade boards that have 512KB of SRAM.
  • So I finally accomplished my goal of getting a Servo to rotate CW and CCW that I have been on and off with since I entered the hospital. Now that I have this figured out I am thinking a Servo is a bit of overkill for one of my projects which is to simply lock and unlock my garage door. That said, does anyone have a recommendation for an inexpensive 5-12V motor that would be able to just move a garage door latch a few inches? The latch is one similar to this. http://www.ebay.com/itm/Universal-Garage-Door-Inside-Latch-Lock-/302010557803?hash=item46513b656b:g:hvUAAOSwepZXRO8e

    However, I will most likely remove the guts in order to make it slide open and closed easier.
  • Andy,
    If the servo has enough power to move the latch, why not use it? The Hbridge is built in, no protection diodes needed, when powered off should have sufficient holding power to stay open/closed.
    Jim
  • I like the Pololu Gear Motors https://www.pololu.com/category/22/motors-and-gearboxes

    What about a solenoid? Make it spring loaded in the closed position. With a motor you have to deal with limit switches or current sensing.
  • I like the solenoid idea. I will toy around with a few different options to see what works best. In the mean time, I LOVE these ESP8266's!!!! I see there was talk of a replacement but have not heard much about them yet. For now, I think these are possibly the least expensive way to go.
  • yeti wrote: »
    Haven't played with it yet but it looks pretty cool. I wonder how much of Lisp is implemented though. From his video, it sounds like maybe only cons cells, integers and atoms (symbols).

  • yetiyeti Posts: 818
    edited 2016-07-27 21:22
    ESP-Lisp still lacks a file system or I'm too dumb to find it...
    lisp> help
    
    
    Welcome to esp-lisp!
    2015 (c) Jonas S Karlsson under MPL 2.0
    Read more on https://github.com/yesco/esp-lisp/
    
    Global/SYMBOLS: eq func? atrun ticks in web null? not % length integer? number? stop apply case cond symbol? string? let* m gc assoc *FREE* pstack heap env map member < at equal print = let prin1 if read 76syms set-cdr! car flashit test list and cdr lambda fib set! progn evallist set-car! scan load define eval flash de atom? 
    COMMANDS: help/trace on/trace off/gc on/gc off/wifi SSID PSWD/wget SERVER URL/mem EXPR/quit/exit
    
    CTRL-C: to break execution, CTRL-T: shows current time/load status, CTRL-D: to exit
    
    Type 'help' to get this message again
    lisp> _
    

    ...and I don't understand how to use the "flash" word/command: https://github.com/yesco/esp-lisp/blob/master/lisp.c#L2432

    Seems I can get something into the flash and read it back... but how to really work with that stuff still is a sealed book...
  • yetiyeti Posts: 818
    edited 2016-07-28 02:33
    Got it compiled...
    $ git describe --tags 
    0.1.3-59-g3daa432
    $ ls -l firmware
    insgesamt 288
    -rw-r--r-- 1 yeti yeti 294848 Jul 28 04:16 *.c.bin
    
    ...and flashed.

    Now the "wifi" command doesn't render the ESP unusable any more. It connects to my AP and is pingable...
    $ ping -c3 192.168.2.108
    PING 192.168.2.108 (192.168.2.108) 56(84) bytes of data.
    64 bytes from 192.168.2.108: icmp_seq=1 ttl=255 time=5.50 ms
    64 bytes from 192.168.2.108: icmp_seq=2 ttl=255 time=2.26 ms
    64 bytes from 192.168.2.108: icmp_seq=3 ttl=255 time=1.73 ms
    
    --- 192.168.2.108 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2003ms
    rtt min/avg/max/mdev = 1.737/3.168/5.504/1.665 ms
    
    The command "web someportnumber" should launch something. Ok.. it does... but connecting to it, ESP-Lisp crashes...

    Ommmmmmmmm... not perfect but better than before... waiting for next flash of enlightenment... ;-)

  • yeti wrote: »
    ESP-Lisp still lacks a file system or I'm too dumb to find it...
    lisp> help
    
    
    Welcome to esp-lisp!
    2015 (c) Jonas S Karlsson under MPL 2.0
    Read more on https://github.com/yesco/esp-lisp/
    
    Global/SYMBOLS: eq func? atrun ticks in web null? not % length integer? number? stop apply case cond symbol? string? let* m gc assoc *FREE* pstack heap env map member < at equal print = let prin1 if read 76syms set-cdr! car flashit test list and cdr lambda fib set! progn evallist set-car! scan load define eval flash de atom? 
    COMMANDS: help/trace on/trace off/gc on/gc off/wifi SSID PSWD/wget SERVER URL/mem EXPR/quit/exit
    
    CTRL-C: to break execution, CTRL-T: shows current time/load status, CTRL-D: to exit
    
    Type 'help' to get this message again
    lisp> _
    

    ...and I don't understand how to use the "flash" word/command: https://github.com/yesco/esp-lisp/blob/master/lisp.c#L2432

    Seems I can get something into the flash and read it back... but how to really work with that stuff still is a sealed book...
    As I expected, this is a very minimal Lisp with no support for arrays or structures or objects or anything other than CONS cells, numbers, strings, and symbols. Well, I guess it supports functions as well but they are probably just tagged lists. It's interesting but maybe not that practical for real application development.

  • yetiyeti Posts: 818
    edited 2016-07-28 03:27
    https://youtu.be/LQ_AVNo-emw?t=810 demonstrates creating functions like "(setq xxx (lambda (x) (+ x x)))".

    We'll see whether it gets stuck or will grow...
    Github will drop me a line on changes...
  • jmgjmg Posts: 15,148
    Heater. wrote: »
    ... Isn't it so that the P2 can suuport QSPI as well.
    ...

    In theory, yes, but I've seen very little concrete test reporting yet on QSPI and HyperRAM.

    Even the Boot loader posts are unclear if this is 'QSPI tolerant'.
    Tolerant here, means not running in QSPI, but being able to connect a QSPI part, of any brand, and have it work
    in the Subset SingleSPI, with a reset arriving in any mode ?
    This needs pins defined, and mode reset command issued.

    The streamer has a nibble mode, which should support QuadSPI bursts, to good speeds.
  • yeti wrote: »
    https://youtu.be/LQ_AVNo-emw?t=810 demonstrates creating functions like "(setq xxx (lambda (x) (+ x x)))".

    We'll see whether it gets stuck or will grow...
    Github will drop me a line on changes...
    Yes, it will be interesting to see how far he gets with this.

  • jmgjmg Posts: 15,148
    yeti wrote: »
    ESP32 already is real,has an own SDK and a forum

    Certainly ESP32 is very close, and it will be a device to watch closely.
    Quite similar to a P2 rollout, in that they have a niche part already, the ESP8266, and this is the 'next generation' with more of everything...

    With ARM being sold, this sort of device may become more popular.



  • Hello all,
    Got my esp8266 reading my windows and doors... got it sending sms messages to my gmail account. Got webserver going. Got it controlling light sockets and other things... All in LUA.

    Just not sure if it's secure. Is the ROM "open source"? Does anybody feel confident in the security of the esp8266?

    Thanks.
    Bob


  • NodeMCU-WebIDE looks promising...

    It's bitchy with Firefox-ESR-45.3.0 but runs fine with Chromium (both tested on Debian-8.5).
  • Clock LoopClock Loop Posts: 2,069
    edited 2016-10-24 01:43
    Time to desolder some old esp8266's 4M ( 512K x 8 ) flash to new 128M ( 16M x 8 ) flash chips.

    Git them now!
    https://www.digikey.com/product-detail/en/winbond-electronics/W25Q128FVSIG/W25Q128FVSIG-ND/3008697


    I was attempting to play with some parallax repositories like https://github.com/parallaxinc/Parallax-ESP.git
    But found my original esp's won't cut it anymore.
  • Clock Loop wrote: »
    Time to desolder some old esp8266's 4M ( 512K x 8 ) flash to new 128M ( 16M x 8 ) flash chips.

    Git them now!
    https://www.digikey.com/product-detail/en/winbond-electronics/W25Q128FVSIG/W25Q128FVSIG-ND/3008697


    I was attempting to play with some parallax repositories like https://github.com/parallaxinc/Parallax-ESP.git
    But found my original esp's won't cut it anymore.
    It would be pretty easy to get Parallax-ESP to work with 1MB modules. It would also be possible to get it to work with 512K modules if I leave out support for over-the-air ESP firmware updates.

  • Clock LoopClock Loop Posts: 2,069
    edited 2016-10-26 22:48
    David Betz wrote: »
    It would be pretty easy to get Parallax-ESP to work with 1MB modules. It would also be possible to get it to work with 512K modules if I leave out support for over-the-air ESP firmware updates.

    I personally will not need that capability, this order arrives tomorrow.

    file.jpg
    1011 x 646 - 115K
    file.jpg 114.7K
  • Good luck replacing the flash chip. That would probably be beyond my capability.
Sign In or Register to comment.