Avatar for Frida

Frida

Member since Sep 2013 • Last active Dec 2020
  • 25 conversations
  • 204 comments

Most recent activity

  • in Electronics
    Avatar for Frida

    The first condition for making it work is that you
    use a transformer with at least 9A, since 6 * 9 = 54W.
    Your bulb is 50W

  • in JavaScript
    Avatar for Frida

    You are missing the last " in "three"

  • in ESP8266
    Avatar for Frida
    // lan-test00 - esp8266_01
    
    var ver = 'ver = V1.0';
    
    function onInit(a) {
      debug = (typeof a==='undefined')?0:a;
      var wlan     = require("Wifi");
      var http     = require("http");
      var logon    = require('LOGON');
    
    
      wlan.stopAP();
      wlan.disconnect();
    
    
      var boola;
      function lan() {
        //wlan.connect(yourssid, {password: yourpassword}, function (s) {
        wlan.connect(logon.ssid, {password: logon.pass}, function (s) {
          boola = true;
          if(s==='bad password') {
            if(debug)console.log('restart lan');
            lan();
          }
        });
    
        if(debug)console.log("Frida is my watchdog");
        if(debug)console.log(wlan.getIP().ip);
      } // end lan()
      setTimeout(lan,400);
    
    
      wlan.on('connected', function(s) {
        if(debug)console.log('Starter test', wlan.getIP().ip);
        if(boola) {
          boola = false;
          //do what you need to do.
          if(debug)console.log('tilsluttet lan');
        }
      });
    
    } // end onInit()
    
    onInit(2); // comment or remove before save
    
    
    
    

    You should not use logon and use your own logon values instead. That's because I have my logon values in a module.
    I use debug until the program runs properly.

  • in ESP8266
    Avatar for Frida

    That mistake I had several years ago
    It turned out that one of my routers was teasing.
    I use the showed up start and since then there have been no problems.
    The other routers have no problems.

      function lan() {
        wlan.connect(logon.ssid, {password: logon.pass}, function (s) {
          boola = true;
          if(s==='bad password') {
            if(debug>0) {console.log('restart lan');}
            lan();
          }
        });
    
        if(debug)console.log("Frida is my watchdog");
        if(debug)console.log(wlan.getIP().ip);
      } // end lan()
    
      setTimeout(lan,400);
    
      
      wlan.on('connected', function(s) {
        if(debug)console.log('Starter test', wlan.getIP().ip);
        if(boola) {
          boola = false;
          startTimeServer();
          //httpSrv.listen(80);
        }
      });
    
    
  • in Bangle.js
    Avatar for Frida

    The menu wraps around, but the time setting doesn't.
    Eg. 55 to 10, I have to push backwards 45 times.
    Eg. 5 to 50, I have to press forwards 45 times.

  • in Bangle.js
    Avatar for Frida

    Vibrator works.
    Beep does not work.

  • in ESP8266
    Avatar for Frida

    I use function() instead of ()=>, because it doesn't work in my browser.
    And to stop analogWrite, use digatalRead.

    // sinus.js
    
    //setInterval( ()=> {analogWrite(D2, (Math.sin(getTime()) / 2.01) + 0.5 );},10);
    
    
    //setInterval( function() {analogWrite(D2, (Math.sin(getTime()) / 2.001) + 0.5 );},10);
    
    analogWrite(D2, 0.5, {freq:1000});
    
    //setTimeout(function() {analogWrite(D2, 0);},1700);
    
    setTimeout(function() {digitalRead(D2);},10);
    
    
  • in General
    Avatar for Frida

    WARNING: Flash size arguments in megabits like '4m' are deprecated.
    Please use the equivalent size '512KB'.
    As you can see '4m' is megabits
    and '512KB' is in kilobytes
    as 1 byte is 8 bit.

    Happy coding.

Actions