Avatar for navas

navas

Member since Jan 2017 • Last active Sep 2019
  • 11 conversations
  • 74 comments

Most recent activity

  • in ESP32
    Avatar for navas

    I am able to run the display using arduino using GxEPD2 lib. But I can't get it work with Espruino :(,

    this is the code I am using, can some one help me getting the display to work?

    var spi;
    var display;
    
    function setupSPI(){
      console.log('starting SPI');
      spi = new SPI();
      spi.setup({ sck:D14, mosi:D13 });
      display = require('SSD1606.min').connect({
          display: {
            bpp : 1,
            displaySizeX      : 200,
            displaySizeY      : 200,
            lutRegisterData   : new Uint8Array([0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), // PARTIAL update lutRegisterData, covered further
            maxScreenBytes    : 5000, // this
            ramXStartAddress  : 0x00, // this
            ramXEndAddress    : 0x18, // this
            ramYStartAddress  : 0xC7, // this
            ramYEndAddress    : 0x00 // and this
          },
          spi        : spi,
          cs1Pin     : D15,
          dcPin      : D0,
          resetPin   : D2,
          busyPin    : D4,
    //      powerPin   : B15
      });
      //display.on();
    
    display.hwReset(function(){
        display.init(
          function(err){
            display.g.clear(0xFF);
            display.g.setRotation(1);
            display.g.setColor(0x00);
            display.g.setFontVector(20);
            display.g.drawString('Hello World!', 22, 22);
            display.g.flip();
            display.refreshScreen(function(err){
              display.off();
            });
          },
          { clearScreenColor: 0x00 }
        );
      });
    }
    
    
    
    function start() {
      setupSPI();
    }
    
    E.on('init', start);
    
  • in ESP32
    Avatar for navas

    Here is the connection with my ESP8266, please let me know if you need any more information

    DISPLAY    |    ESP8266
    —————————————————————
    VCC        |    3.3V
    GND        |    GND
    SDI        |    13
    SCLK       |    14
    CS         |    15
    D/C        |    0
    Reset      |    2
    Busy       |    4
    
  • in ESP32
    Avatar for navas

    Does anyone know how to connect this on a plain ESP8266-12E?

    • 18 comments
    • 2,009 views
  • in The Place for Patreon Patrons
    Avatar for navas

    I would love to discuss more on Alexa integration!

  • in ESP8266
    Avatar for navas

    Is there any progress?

    Thanks
    Navas

    • 6 comments
    • 1,957 views
  • in Pico / Wifi / Original Espruino
    Avatar for navas

    @furuskog I would recommend you buy preinstalled one. You definitely don't want to go through the troubles which I had.

    Thanks
    navas

    • 2 comments
    • 761 views
  • in Interfacing
    Avatar for navas

    hi everyone,

    Does any know how to capture multiple IR codes through an IR receiver at the same time? My remote seems to send multiple codes on a single press. How do you capture them on times?

    This example is good to capture events one code at a time. I can print them to console using
    console.log(times.toString());

    but the problem is it is always printing the last one received.

    digitalWrite(B7, 0); // Set B7 to GND
    digitalWrite(A8, 1); // Set A8 to 3.3V
    // Because we're not using the module, we have to manually pull up the data pin
    pinMode(B6,"input_pullup");
    // Keep somewhere to put the signal times
    var times = [];
    // now watch the input
    setWatch(function(e) {
      // work out how long the pulse was, in milliseconds
      var pulseLen = 1000 * (e.time - e.lastTime);
      // then save it, if it was less than 1 second
      if (pulseLen < 1000)
        times.push(pulseLen);
      else
        times = [];
    }, B6, {repeat:true});
    

    Thanks
    Navas

Actions