Avatar for Pat

Pat

Member since Mar 2014 • Last active Jan 2020
  • 9 conversations
  • 77 comments

An IoT fan, but total novice. Love Espruino !

Most recent activity

  • in General
    Avatar for Pat

    I'm sorry. Lost. Too newbie, I suspect ! This ?

    Serial2.setup(9600, { rx: A3, tx : A2 });
    var wifi = require("ESP8266WiFi");
    wifi.at.cmd("AT+GMR\r\n",1000,console.lo­g);

    Don't understand how (without the connect) I talk down Serial2.
    Anyway, this code errors with ...

    Uncaught Error: Field or method "cmd" does not already exist, and can't create it on undefined
    at line 1 col 8
    wifi.at.cmd("AT+GMR\r\n",1000,console.lo­g);

  • in General
    Avatar for Pat

    Thanks !

    Tried this ..

    Serial2.setup(9600, { rx: A3, tx : A2 });
    wlan.at.cmd("AT+GMR\r\n",1000,console.lo­g);

    Got

    echo(0);
    =undefined
    Uncaught Error: Field or method "at" does not already exist, and can't create it on undefined
    at line 1 col 5
    wlan.at.cmd("AT+GMR\r\n",1000,console.lo­g);

    Have I got the right firmware ? Is there a special build to support the 8266 ?

  • in General
    Avatar for Pat

    I'm not getting out of the starting blocks with this.

    With this simple code

    Serial2.setup(9600, { rx: A3, tx : A2 });
    var wifi = require("ESP8266WiFi").connect(Serial2,
       function(err) {if (err) throw err;wifi.getAPs(print);});
    

    I get ..

    >reset();
    =undefined
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v79 Copyright 2015 G.Williams
    >echo(0);
    =undefined
    >Uncaught No 'ready' after AT+RST
     at line 1 col 17
    {if (err) throw err;wifi.getAPs(print);}
                     ^
    in function "a" called from line 1 col 100
    ...a("No 'ready' after AT+RST");else return c}
                                   ^
    in function "b" called from line 1 col 16
    {c=void 0;b&&b()}
                    ^
    in function called from system
     
    

    So it looks like I am not even talking to the 8266. Cabling is Ok. I have a 47uF cap across the power lines. Cabling possibly a bit hacky, have the 8266 board attached via header cable to breadboard where the Pico is plugged in. Have checked usual shorts and that all the pins are happy. They are. And that

    URXD -> Pico A2
    UTXD _> Pico A3
    VCC -> +3.3
    GND -> GND
    CH_RD -> +3.3 (is this right? permanently tied to +3.3?)

    My iPhone is actually seeing a WiFi Network called ESP8266 appear when I boot, though. So I guess the module is alive. When it boots, I see a steady red led on the board, and a couple of flashes from the blue led.

    Have tried 115,200 as baud rate too. Same problem.

    Any ideas please ?

    Thanks!

    Pat

    • 116 comments
    • 41,947 views
    • 3 comments
    • 3,001 views
  • in JavaScript
    Avatar for Pat

    Hi, this is incredibly kind and very helpful. Fog begins to clear :)

    I think a hacking session or 10 will make this stick eventually!

    A million thanks.

    Pat

  • in JavaScript
    Avatar for Pat

    Is there anyone here who can point me at a really good introduction to function expressions in JavaScript. I have a basic understanding now, but am constantly tripping up and much of the example code here relies on this. As some fundamental level, I am failing to 'get it' !

    TIA

    Pat

Actions