Avatar for hygy

hygy

Member since Oct 2015 • Last active Oct 2018
  • 6 conversations
  • 63 comments

Most recent activity

  • in ESP32
    Avatar for hygy

    Hi,

    I'm trying to make work 2 esp32 modules with lora. But I did not succed.

    espruino version: 1v99.4103
    pinout (i hope it is good): https://cdn.hackaday.io/files/2699111547­82944/Heltec_WIFI-LoRa-32_DiagramPinout.­jpg

    For tx code i use:

    SPI1.setup({ sck:D5, mosi:D27, miso: D19 });
    
    var sx = require("SX127x").connect({spi: SPI1, cs: D18, rst : D14 });
    
    setInterval(function() { sx.onIRQ(); }, 100);
    
    var config = {
      freq: 868E6
    };
    
    sx.setTxConfig(config);
    
    sx.send("Hello", function() {
      console.log("TX done");
    });
    

    for the rx config i use:

    SPI1.setup({ sck:D5, mosi:D27, miso: D19 });
    
    var sx = require("SX127x").connect({spi: SPI1, cs: D18, rst : D14 });
    
    setInterval(function() { sx.onIRQ(); }, 100);
    
    var config = {
      rxContinuous : true,
      freq: 868E6
    };
    
    console.log('starting receiver');
    sx.setRxConfig(config);
    // enter receive mode
    sx.rx(function(err, inf) {
      // Error, or you get signal strength and data returned in an object
      if (err) console.log("RX ERROR");
      else console.log("RX>",inf);
    });
    

    I got no erros. On tx I got nothing. On rx I got this after upload:

    >starting receiver
    RX> { "snr": 82, "rssi": 82,
      "data": new Uint8Array([82, 82, 106, 57, 74, 161, 198, 62, 219, 7, 163, 65, 161, 130, 133, 51, 199, 36, 195, 5, 38, 5, 180, 150, 128, 35, 21, 91, 209, 28, 236, 12, 240, 80, 184, 230, 197, 134, 10, 22, 185, 154, 4, 0, 65, 225, 192, 10, 25, 14, 79, 117, 132, 194, 240, 160, 192, 83, 163, 48, 201, 0, 242, 12, 28, 228, 98, 16, 132, 5, 180, 231, 64, 201, 65, 82, 108, 14, 10, 232, 244, 114])
     }
    

    What I'm doing wrong?

    thanks

    • 1 comment
    • 79 views
  • in ESP8266
    Avatar for hygy

    Try to connect firs from terminal. Eg minicom in linux

  • in ESP32
    Avatar for hygy

    Can u post here a lora example?

  • in ESP32
    Avatar for hygy

    When will be get this into the main line? In the next stable release?

  • in ESP32
    Avatar for hygy

    Okay, the reset pin was wrong. Now, its working thanks.

    Anybody have an espruino example code with lora on a helltech board?

  • in ESP32
    Avatar for hygy

    Thanks! I downloaded your binaries.

    Do you have example code for?

    • rx and tx with lora module
    • bluetooth

    Yesterday I successfully created a code to drive the oled, but with this espruino version I got this:

    >WARNING: jshI2CSetup: driver installed, sda: 4 sdl: 15 freq: 100000,
    ERROR: jshI2CWrite:, slave doesn't ACK the transfer.
    

    And the the code worked yesterday does not drive with this espruino version.

  • in ESP32
    Avatar for hygy

    It works for me. (At least the first test.) I can connect (after a reset) with espruino ide. Thanks!

  • in ESP32
    Avatar for hygy

    I downloaded the latest binary from travis, but it does not help for me.

    How can I make this work? (I got this board just today.)

    So answering for myself:
    flash complett 1v95 version,
    then just flash the espruino_esp32.bin

    And now I can use espruino ide, but the ide is slow. (the same speed trough wifi connection)

  • in ESP32
    Avatar for hygy

    Can U paste here, the lora connection code too? The oled is working for me. (but wifi connection is not with espruino version espruino 1v95)

    this is what is not working for me:

    SPI1.setup({ sck:D5, mosi:D27, miso: D19 });
    
    var sx = require("SX127x").connect({spi: SPI1, cs: D18, rst : D14 });
    
    setInterval(function() { sx.onIRQ(); }, 100);
    
    var config = {
      rxContinuous : true,
      bandwidth: 2
    };
    
    
    /*
    sx.setRxConfig(config);
    
    // enter receive mode
    sx.rx(function(err, inf) {
      // Error, or you get signal strength and data returned in an object
      if (err) console.log("RX ERROR");
      else console.log("RX>",inf);
    });
    // after a while, stop receiving
    setTimeout(function() {
      sx.standby();
    }, 10000);
    
    */
    
    
    
    sx.setTxConfig(config);
    
    sx.send("Hello", function() {
      console.log("TX done");
    });
    
Actions