Avatar for Bennr

Bennr

Member since Apr 2015 • Last active Jun 2019
  • 8 conversations
  • 43 comments

Most recent activity

    • 8 comments
    • 374 views
  • in Pico / Wifi / Original Espruino
    Avatar for Bennr

    Ugh, guess what? Turning my router on and off seems to have fixed the issue.

    What I'm trying to do is to get an URL a few times a day. If my Wifi needs to be reset along the way, will I need to tell the Pico to reset its connection too? So if I try and fail to get a response, will I need to reset the connection is what I mean.

  • in Pico / Wifi / Original Espruino
    Avatar for Bennr

    Thanks, I had a sinking feeling it's something to do with my Wifi.

    I had a look on my router and it's seeing the Espruino and assigning it an IP address.

    Output is:

    ["AT+CIFSR\r\n"
    =undefined
    ] "+CIFSR:STAIP,\"192"
    ] ".168.1.5\"\r\n+CIFSR:STAMAC,\"18:fe:34:­9d:5"
    ] "2:14\"\r\n\r\nOK\r\n"
    null 192.168.1.5
    
  • in Pico / Wifi / Original Espruino
    Avatar for Bennr

    Yes I think it's something stupid I'm doing. It connects to the WiFi but just won't get anything.

    I tried substituting the URL for 172.217.169.14 which I think is the ip for google.com but got the same result.

    Thanks,

    Here's my code:

    digitalWrite(B9,1); // enable on Pico Shim V2
    Serial2.setup(115200, { rx: A3, tx : A2 });
    
    const http = require("http");
    
    var wifi = require("ESP8266WiFi_0v25").connect(Seri­al2, function(err) {
      if (err) throw err;
      console.log("Connecting to WiFi");
      wifi.connect(WIFI_NAME, WIFI_PASS, function(err) {
    
        if (err) throw err;
        console.log("Connected");
    
        fetchData();
    
      });
    });
    
    function fetchData() {
      console.log('Fetching data');
      http.get("http://gomako.co.uk/hello.txt"­, function(res) {
      var contents = "";
        res.on("data", function(data) { contents += data; });
        res.on("close", function() { console.log(contents); });
      }).on("error", function(e) {
        console.log("ERROR", e);
      });
    }
    
  • in Pico / Wifi / Original Espruino
    Avatar for Bennr

    Hi, I got one of the original Picos with wifi shim and have updated the firmware on the Pico to 2v01 using TI CC3000 Wi-Fi networking (I did try with the other one as well just to make sure). I checked the ESP firmware on the board and that is as follows "AT version:0.25.0.0(Jun 12 2015 20:26:28)\r\nSDK version:1.1.2\r\ncompile time:Jun 17 2015 22:11:51\r\n\r\nOK\r\n" I think it's the most stable version?

    When I do a simple GET request, it times out and throws an error, which varies from code -6, not found to code -15, no response

    I can access the endpoints through the browser/curl so I think that's ok. Am I missing something obvious? It's been a while since I did anything with my Pico and wifi so may have missed an update somewhere.

  • in Other Boards
    Avatar for Bennr

    Thanks for the info @Robin I'll have a look at that to try and further my understanding.

    Thanks for the code @Gordon and for the tip about finding the underlying code. I find it fun to dig about and try and understand these things, even if it usually comes to nothing! There is a lot of information about the chip here http://infocenter.nordicsemi.com/pdf/nRF­52832_PS_v1.1.pdf which looks pretty exciting, so I'm going to mess about with it using the js interface and see what happens.

  • started
    • 6 comments
    • 405 views
  • in Other Boards
    Avatar for Bennr

    Thanks for the info. I'm messing about using the examples, but I don't really know what I'm doing to be honest. I keep peek32()ign at everything I can think of, but the returned values stay the same. I don't have ~much~ any experience with low level stuff.

    Is the code that does this on the Puck available somewhere for me to look at to try and understand it, or will that not really help?

  • in Other Boards
    Avatar for Bennr

    Hi, not sure if this is the right place to post about this board. I have got one and think it's great and am looking forward to exploring it more.

    I'm trying to figure out how to access the capacitive touch sensors but can't figure it out. I have looked at the boards/smartibot.py file and can't see anything mentioning about capacitive sensors like in the puck.js file. I am keen to explore the board and somehow figure this sort of stuff out but can't really get my head around it!

    Any guidance would be appreciated.

Actions