Avatar for user79559

user79559

Member since Jul 2017 • Last active Oct 2018
  • 4 conversations
  • 11 comments

Most recent activity

    • 15 comments
    • 197 views
  • in ESP8266
    Avatar for user79559

    I understand the problem. When you output a long word, it fails. And when you perform on a short command, there is no failure. Use this method is unrealistic. Maybe in the future it will make the library better

  • in ESP8266
    Avatar for user79559

    Connected TFT, does screen cleaning, then outputs half of the word " hi " does reboot :)

  • in ESP8266
    Avatar for user79559

    Connected TFT, does screen cleaning, then outputs half of the word " hi " and does reboot :)

  • in ESP8266
    Avatar for user79559

    The hardware SPI uses the pins shown in the board layout (CLK:D14, MISO:D12, MOSI:D13, CS:D15).

    reset D5
    cs D4
    connected everything correctly

  • in ESP8266
    Avatar for user79559

    The hardware SPI uses the pins shown in the board layout (CLK:D14, MISO:D12, MOSI:D13, CS:D15).
    reset D5
    cs D4
    connected everything correctly

  • in ESP8266
    Avatar for user79559

    Good day, everyone! I have a problem with module ILI9341. I'm plugging it in on esp12F. After loading and cleaning the screen appears, after which the esp is rebooted and so on. Please help if anyone knows what the problem is.

    var ESP8266 = require("ESP8266"),
         wifi = require("Wifi");
    function onInit() {
      wifi.stopAP();
       wifi.connect("INGRIFABSR", {password: "B73vFeX6se2"}, function(err) { // 192.168.99.61
           if(err)console.log(err);else {
            print("connected! "+wifi.getIP().ip);
    var SPI1 = new SPI();
        SPI1.setup({ sck:D14, miso:D12, mosi:D13 ,baud: 1000000});
    var g = require("ILI9341").connect(SPI1, D5, D15, D4, function() {
      g.clear();
      g.drawString("Hello",50,50);
    //  g.setFontVector(20);
    //  g.setColor(1,0.5,1);
    //  g.drawString("Espruino",0,10);
    });
         }
       });
    }
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v00 (c) 2018 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:1024/1024, manuf 0xef chip 0x4016
    >
    >save()
    =undefined
    Compacting Flash...
    Calculating Size...
    Writing..
    ComRunning onInit()...
    connected! 192.168.99.106
    >
     ets Jan  8 2013,rst cause:2, boot mode:(3,5)
    load 0x40100000, len 2408, room 16
    tail 8
    chksum 0xe5
    load 0x3ffe8000, len 776, room 0
    tail 8
    chksum 0x84
    load 0x3ffe8310, len 632, room 0
    tail 8
    chksum 0xd8
    csum 0xd8
    2nd boot version : 1.6
      SPI Speed      : 40MHz
      SPI Mode       : DIO
      SPI Flash Size & Map: 32Mbit(1024KB+1024KB)
    jump to run user1 @ 1000
    
  • in ESP8266
    Avatar for user79559

    I connect SIM800l in on Serial1. Connect for debugging via WIFI, everything works fine. As soon as disconnect the Web ide from the module, the module shuts down and restarts. After the reboot, the program comes to the moment of work with Serial1 and again leaves in reboot. This happens endlessly, while connecting web ide. What could be the problem?
    After connecting you see this:


    | |_ ___ ___ _ ||___ ___
    | |_ -| . | _| | | | | . |
    |
    || || |_|||_|_|

          |_| http://espruino.com
    

    1v93 Copyright 2016 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016

    =undefined
    Erasing Flash..................
    Writing...........
    Compressed 25600 bytes to 8910
    Checking...
    Done!
    Running onInit()...
    connected!
    192.168.99.66
    point_rssi : -74 db

    Disconnected
    Connected

    Svoojoh!poJoju)///?Twppkpi"qpKpkv+000@Uxqqlqj#rqLqlw+,111AVyrrmrk$srMrmx,­-222BWzssnsl%tsNsny-.333CX{ttotm&utOtoz.­/444DY|uupun'vuPup{/0555EZ}vvqvo(wvQvq|0­1666F[~wwrwp)xwRwr}12777GxxsxqyxSxs~23888H]!yytyr+zyTy34999I^"zzuzs,{z­Uzu!45:::J_#{{v{t-|{V{v"56;;;K$||w|u.}|W|w#67<<<La%}}x}v/~}X}x$78===Mb­&~~y~w~Y~y%89>>>Nx1z&9:???Od(!!{!y2"![!{­':;@@@Pe)""|"z3#"\"|(;<AAAQf*##}#{4$#]#}­)<=BBBRg+$$~$|5%$^$~*=>CCCSh,%%}6&%_+>?D­DDTi-&&!&~7'&&!,?@EEEUj.''"8('a'"-@AFFFconsole.log("<­","<<",JSON.stringify(process.env),">>",­">")
    Uncaught ReferenceError: "poJoju" is not defined
    at line 1 col 9
    Svoojoh!poJoju)
    ///?Twppkpi"qpKpkv*+000@Uxqqlqj#rqLqlw+,­111A...

        ^
    

    point_rssi : -57 db
    AT+COPS?


    my code:

    var p1 = ""; var p2 = ""; var p3 = ""; var p4 = "";

    var start;
    var ow;
    var i = 0;

    function reboot(){
    print("reboot...");
    ESP8266.reboot();
    }

    var point_rssi = 0; var ip; var mac;

    var ESP8266 = require("ESP8266"),

     wifi = require("Wifi");
    

    function onInit() {
    wifi.stopAP();
    wifi.connect("INGRIFAB", {password: "B73vFeX6se2"}, function(err) {

        if(err)console.log(err);else console.log("connected!");
        console.log(wifi.getIP().ip);
        ip = wifi.getIP().ip;
    

    wifi.getStatus(function(ap) {

        if(ap.station === 'connected'){
          setTimeout(wifi_scan,1000);
          setInterval(send_data, 3000);
          setInterval(reboot, 86400000);
          setInterval(reset_modem, 86400000);
          reset_modem();
          Serial1.setup(115200);
    
          setTimeout(Start_modem,10000);
    
        }
    });
    

    });
    }

    Pin.prototype.startFlashing = function(period,stop) {
    var delay_led; var on_led;
    var pin = this;
    if (stop === true){clearInterval(delay_led);digitalWr­ite(pin, true);}else{stopon_led = false;}
    if(stop === false){

    delay_led = setInterval(function() {
    on_led = !on_led;

    digitalWrite(pin, on_led);
    

    }, period);
    }
    };

    function sms_send(text_sms){
    D5.startFlashing(100,false);
    //setTimeout(function (){D5.startFlashing(100,true);},2000);
    var i=0;
    var arr_comand =["AT+CMGS=\"+79216444654\"",text_sms,"\­x1A"];
    var interval_init = setInterval(function(){

        if(i<arr_comand.length){
           Serial1.println(arr_comand[i]);
           //print("comand : "+arr_comand[i]);
          i++;
        }
    if(i == arr_comand.length){
      clearInterval(interval_init);
    }
    

    }, 400);
    }
    function reset_modem(){
    digitalWrite(D13, true);
    digitalWrite(D13, false);
    digitalWrite(D13, true);
    }

    function Start_modem(){
    digitalWrite(D5, false);
    var connection = setInterval(function(){ Serial1.println("AT+COPS?");},300);
    Serial1.on('data', function (data) {

         print("<Serial1> "+data);
    
    if(data.indexOf("+COPS:")>-1){
       clearInterval(connection);
       //print("modem start");
       init_modem();
       digitalWrite(D5, true);
     }
    
    if(data.indexOf("+CUSD: 0, ")>-1){
       list_balanse(data);
       //print("SMS OK");
       digitalWrite(D5, true);
    }
    

    });
    }

    function list_balanse(stringOne){
    var newstr = stringOne.substring(13, 49);
    //print("newstr : "+newstr);
    var arr = [];
    var d = 0;
    var result ="";
    for (var i = 0; i < 24; i+=4) {
    arr [d] ='0x' + newstr.substring(i, i+4);
    if(parseInt(newstr.substring(i, i+2)) === 0){
    result += String.fromCharCode(arr[d]);
    }
    }
    //print("balanse : "+result);
    }

    function balans(){
    digitalWrite(D5, false);
    Serial1.println("AT+CSQ");
    Serial1.println("AT+CUSD=1,\"*100#\"");
    }

    function init_modem(){
    var i=0;
    var arr_comand =["AT+CMGF=1","AT+IFC=1, 1","AT+CSCS=\"GSM\""];
    var interval_init = setInterval(function(){

        if(i<arr_comand.length){
           Serial1.println(arr_comand[i]);
           //print("comand : "+arr_comand[i]);
          i++;
        }
    if(i == arr_comand.length){
      clearInterval(interval_init);
      sms_send('System reboot and start');
    }
    

    }, 300);
    }

    function send_data(){
    digitalWrite(D4, false);
    //print(process.memory().free);
    // if(process.memory().free < 600)ESP8266.reboot();

Actions