Avatar for Will

Will

Member since Mar 2016 • Last active Jun 2019
  • 7 conversations
  • 45 comments

Most recent activity

    • 8 comments
    • 915 views
  • in ESP32
    Avatar for Will

    thank you!

  • in ESP32
    Avatar for Will

    Hi - thank you for any help you might provide. Dev board is running other code, so I pulled this from notes, not a working board.

    const SURLAPI = 'https://i66toll.firebaseio.com/eb/belt/­washington/tolls.json?orderBy=%22$key%22­&limitToLast=1';
    const HTTP = require("http");
    //ESP32.enableBLE(false);
    
    function onInit()
    {
        //console.log("main");
        //loadTolls();
    }
    
    var options = {
        host: 'i66toll.firebaseio.com', // host name
        port: 443,            // (optional) port, defaults to 80
        path: '/eb/belt/washington/tolls.json',           // path sent to server
        method: 'GET',       // HTTP command sent to server (must be uppercase 'GET', 'POST', etc)
        protocol: 'https:',   // optional protocol - https: or http:
        headers: { orderBy : "%22$key%22", limitToLast : 1 } // (optional) HTTP headers
      };
    
    function loadTolls()
    {
        //getting weather now, so allow another process to get weather
      
        HTTP.get(options, function(res) 
        {
            res.on('data', function(wunderString)
            {
              loadTolls.val = wunderString;
              console.log(wunderString);
              memUsage();
            });
            res.on('close', function(fLoaded)
            {
              memUsage();
            });
            res.on('error', function(e){console.log("error getting URL details");});    //TODO: test, and handle by saving values?
        });
    }
    
    function memUsage()
    {
      console.log(process.memory().usage);
    }
    
  • in ESP32
    Avatar for Will

    Is SSL available on ESP32? I know it wasn't at one point. If not, does anyone know URL/service that can be used to translate?

    I'm trying to pull information from https://firebaseio.com

    I get out of memory error, and have tried turning off bluetooth with no avail. Perhaps I should look into building my own?

    Using version 2.01.

    Thank you in advance.

  • in Interfacing
    Avatar for Will

    @patreon is this site still available? Can others use it?

  • in JavaScript
    Avatar for Will

    Maybe this is now possible on some of the larger devices such as the ESP 32?

  • in Projects
    Avatar for Will

    Oh, I am using the webIDE (love it), I didn't realize it would do that for me. Very cool.

  • in Projects
    Avatar for Will

    @Wilberforce good tip on the line between text. That code has room for improvement in that I might like to use regex to split the text in a more natural place.

    I do load the module dynamically, because I thought I had to. Perhaps you're suggesting I only need to do that prior to the save?

Actions