Avatar for Scargill

Scargill

Member since Apr 2017 • Last active Apr 2017
  • 2 conversations
  • 11 comments

An ESP8266 enthusiast, I've written my own C code for the boards to handle WIFI, MQTT and talk to a range of devices with complete reliability - but I'm interested in the possibilities of using Javascript and hence Espruino.

My normal ramblings can be found over at http://tech.scargill.net which has a large following and we chat about everything from SBCs through the tools to use them down to ESP8266 and Arduino. You're welcome to join us.

Pete.

Most recent activity

  • in JavaScript
    Avatar for Scargill

    Hi there Ollie

    That looks good - can't test it - I've put my stuff away for travelling.... that looks good -but - and this is a guess - should that routine now also include any subscribes that you have lost... and if so is there a way to call that routine normally so that we don't duplicate code.. so perhaps that on disconnect could call a routine with the connect and subscribes - and that routine could also be used at startup??? I'm assuming in all of this that the WIFI reconnects automatically?

    Hopefully early next week I can settle down in my office in Spain and try all of this out.

    I'm also at a loss as to why the limited space for code - given that the ESP12 has 3 meg spare? I wonder if there are any plans to check for that and expand user space accordingly?

  • in JavaScript
    Avatar for Scargill

    Hi Ollie

    I'm somewhat behind you on this having just gotten MQTT working - and discovered the same thing as you - it disconnects, doesn't reconnect and doesn't keep the subscribes. Care to share to save hours of duplicated effort??

    Pete.

  • in ESP8266
    Avatar for Scargill

    Using the ESP8266 I've managed a connection - no problem - and an MQTT (https://www.espruino.com/MQTT) connect - with subscribe. All works swimmingly well.

    But, if you disconnect and reconnect the router, you've lost your MQTT connection and subscribes - although the WIFI does seem to reconnect automatically.

    Has anyone already written something to check for broken MQTT connect - and reconnect automatically? (without which of course it isn't a lot of use :-) )

  • in ESP8266
    Avatar for Scargill

    Thanks Ollie. Your help with someone very new to this particular setup is much appreciated.

    • 12 comments
    • 5,157 views
  • in ESP8266
    Avatar for Scargill

    I've been playing with the IDE and it does seem to have issues talking to a board from power up - if I go to my serial terminal, reboot the ESP8266 and talk to the Espruino THEN switch to the IDE all is well, but if I reboot the board in the IDE - I get nothing... any ideas?

  • in ESP8266
    Avatar for Scargill

    Hi Ollie - that looks good - but before I investigate further - should I expect this to work on an ESP12? It says something about STM32?

  • in ESP8266
    Avatar for Scargill

    HI there

    Thanks to all for the feedback - I'm sure someone will see that it is entirely possible to get this wrong as a first time user.
    About the only thing driving me nuts now that I understand, is this "undefined" thing... Shame you can't turn that off - it happens after many lines entered manually - though everything appears to work.

    I noted that despite using a 4MB ESP12, there's only, what, 12K to store programs? That's what I read in the docs - is there a way around that now ? Seems to me there is around 3MB spare (now I have that getFreeFlash() working - thanks Ollie.

    This looks like it might be fun.

  • in ESP8266
    Avatar for Scargill

    Also - this - in the docs - is unrecognised.

    ESP8266.getFreeFlash()

    Mentioned here.. https://www.espruino.com/EspruinoESP8266

Actions