Avatar for llakie


Member since Feb 2018 • Last active Mar 2018
  • 2 conversations

Most recent activity

  • Avatar for llakie

    Solved it :) It was like I expected. Wired the compass module directly to the 5V USB output on the board and it works now. I was just unsure, whether the module supports 5 Volts or not. Thank you data sheet - it does.

  • Avatar for llakie

    Hi there,
    I got the following problem:
    I want to the CMPS10 acceleromometer sensor and the Espruino Wifi at the same time. I'm now struggeling getting them to run smoothly. As soon as I call espruino_wifi.connect (whereas espruino_wifi references the EspruinoWiFi module) the data from I2C Bus freezes somehow and the sensor does not deliver any data anymore. I'm powering the sensor through the 3.3V output on the Espruino Board.
    Separatly they work beautifully.
    Thank you in advance for any idea :)

    The three numbers are readings from my sensor. As soon as the WiFi module kicks in, the values freeze.

    >Loading 48629 bytes from flash...
    0.00097657740  0.20996414129  0.88868543526
    0.01464866102  0.18359655146  0.93165484092
    0.04199282825  0.17578393224  0.95606927595
    0.00585946440  0.19433890287  0.92677195391
    0.01367208361  0.17773708705  0.95411612115
    Connecting to access point using EspruinoWiFi module
    0.03027389944  0.14941634241  0.95020981155
    -0.01068131532  0.18359655146  0.93751430533
    -0.01556420233  0.16992446784  0.93556115053
    -0.01556420233  0.16992446784  0.93556115053
    -0.01556420233  0.16992446784  0.93556115053
    -0.01556420233  0.16992446784  0.93556115053
    -0.01556420233  0.16992446784  0.93556115053
    -0.01556420233  0.16992446784  0.93556115053
    Successfully connected to Access Point
    -0.01556420233  0.16992446784  0.93556115053
    -0.01556420233  0.16992446784  0.93556115053
    -0.01556420233  0.16992446784  0.93556115053
    -0.01556420233  0.16992446784  0.93556115053
  • in Pico / Wifi / Original Espruino
    Avatar for llakie

    Hi Gordon, I got it working.
    What did I do:

    • Use the ESP8266WiFi_0v25 library and connect to the onboard wifi controller. (Do manual Serial configuration as stated above)
    • Moved from latest travis build to normal v95 build.
    • Reinstalled the WebIDE since it was somehow responsible for not being able to load any module anymore (checked offline mode - it was off)
    • And now: it works like a charm.

    My problem with this HTTP stuff was related to the external ESP8266 in my opinion.

    Thank you very much for your immediate help.

  • in Pico / Wifi / Original Espruino
    Avatar for llakie

    Hi Gordon, the A13 and A14 set to high seemed to work for the WiFi module. But now I get the following error: "Pin A3 is not capable of USART1 RX". It does not make any difference when I do the Serial setup by myself or just take the EspruinoWifi module. Do you have any idea, what happened here?

  • in Pico / Wifi / Original Espruino
    Avatar for llakie

    Hi Gordon,
    I used the ESP8266WiFi_0v25 module and it works once now :) So when I power down my Espruino and power it up again, one request gets executed flawlessly. Any succeeding request gets stuck as before. But it's more than before. I will try whether I powered the integrated board down accidentially.

  • in Pico / Wifi / Original Espruino
    Avatar for llakie

    Hi Gordon,
    thank you for your reply. There is no serial connection possible anymore (Over Serial2 --> Serial2.setup(9600, { rx: A3, tx : A2 });). Any AT+* command could not be sent to the board since there seem to be no connection.
    I did not try to reflash the ESP8266 onboard module.(Is there a manual for that?)
    Is there any documentation of how to connect the flow control to the external WiFi module?

    The full code is as follows:

      Serial1.setup(115200, { rx: B7, tx : B6 });
      var esp8266 = require('ESP8266WiFi');
      console.log("Connecting to ESP8266");
      var wifi = esp8266.connect(Serial1, function() {
      console.log("Connecting to WiFi");
        wifi.reset(() => {
         /*Does not close all sockets, I assume --> CIPServer creation fails after some restarts of the Espruino*/
          console.log('Reset WiFi');
          console.log('Creating access point');
          wifi.createAP('BLA', '12345678', 1, 0, (err) => {
            if (err) {
              console.log('An error occured:');
            console.log('Access Point created');
            require('http').createServer((req, res) => {
              req.on('end', function() {
                console.log('request stream end (http.incomingMessage stream)');
              res.on('end', function() {
                console.log('response finish (http.serverResponse)');
              req.on('close', function() {
                console.log('request close (http.incomingMessage)');
              res.on('close', function() {
                console.log('response close (http.ServerResponse)');
              console.log('Request Headers:');
              console.log('Request Method:');
              var a = url.parse(req.url, true);
              res.writeHead(200, {'Content-Type': 'text/plain'});
            console.log('Http server created');
  • in Pico / Wifi / Original Espruino
    Avatar for llakie

    Hi there,
    I have problem sending a http response back to the client.
    My setup is as follows: Since the WiFi module on my EspruinoWiFi is broken, I wired an external ESP8266 module to the board. I create an access point and after that an http server by calling http.createServer((req, res) => {...}).listen(80)

    Now my problem:
    When I connect to the AccessPoint and send a http GET request to my Esprunino, it gets the request data.
    But when I call res.writeHead(200, { 'Content-Type': 'text/plain'}); res.write('Foo'); res.end(); in succession the client never gets any response and the connection seems to stay open forever. Am I doing s.th. wrong?

    For debug purposes I registered Event listeners on req.on('end', () => {...}), req.on('close', () => {...}), res.on('end', () => {...}) and res.on('close', () => {...}).

    The events are getting called in the following order:

    Seems to me, that nothing is going wrong. I'm using the latest firmware (v95). Does anyone has a solution for this? Thank you in advance