Avatar for DamianMontero

DamianMontero

Member since Jun 2019 • Last active Sep 2019
  • 4 conversations
  • 26 comments

Javascript developer since I was in my 20's and that was a LOOOOONG time ago

Most recent activity

  • in ESP8266
    Avatar for DamianMontero

    @MaBe - I don't know what the value but you can see 62 that it's height>>3 already. What's this value suppose to be?

    @fanoush - So are you saying that instead of 1 to 64 I just do everything: 30-94? I think there's something off. I mean I could just think of it like that but obviously it's ignoring the problem.

    ALSO changing the WIDTH simply cuts the screen in the middle. So obviously there still needs to be a shift to the right.

    where would that be? Any help would be appriciated.

    @Gordon Once I have this done I'll submit a change that will NOT affect any of the existing resolutions but also ADD this one.
    (I'll probably make some of the fields like WIDTH to be able to be passed. that will help)

  • in ESP32
    Avatar for DamianMontero

    what's the Hall Sensor? is it called something else?

  • in ESP8266
    Avatar for DamianMontero

    @Gordon
    How can I contribute to the next release of the ssd1306.js with code that will work on all the other 1306 leds but ADD the 64x48 resolution?

  • in ESP8266
    Avatar for DamianMontero

    Thank you @MaBe
    That gave me the values I was looking for. I knew that all that needed to change the values of the initCmds variable from the original 1306 module http://www.espruino.com/modules/SSD1306.­js
    There was also the initCmds[15] change when initializing that I needed to update. My new driver can be found at: https://github.com/bocajs/NodeBotDays/bl­ob/master/Espruino/ssd1306.js

    The working code from: https://github.com/bocajs/NodeBotDays/bl­ob/master/Espruino/oled.js

    function start(){
      g.clear();
      g.drawString("Hello",35,0);
        g.drawLine(35, 20, g.getWidth(), 20);
      g.setFontVector(10);
      g.drawString("1234567890",20,7);
      g.drawString("1234567890",20,22);
      g.drawString("1234567890",20,35);
      g.flip();
    }
    
    // HELTEC 128x32
    /*
    let SCL = D5;
    let SDA = D4;
    I2C1.setup({scl:SCL,sda:SDA});
    var g = require("ssd1306").connect(I2C1, start, { height : 32 });
    */
    
    //D1.Mini OLED 64x48
    let SCL = D1;
    let SDA = D2;
    I2C1.setup({scl:SCL,sda:SDA});
    var g = require("https://raw.githubusercontent.c­om/bocajs/NodeBotDays/master/Espruino/ss­d1306.js").connect(I2C1, start, { height : 48 });
    
    

    BUT...
    As you can see from the code. I did NOT change the width. I left it at 128. INSTEAD of 64.
    Everything is shifted over to the left. so to make the text be lined up I have to start it as if it's 30 pixels to the RIGHT.

    What value could be causing this?

  • in ESP8266
    Avatar for DamianMontero

    I need your help with the SSD1306 driver for the ESP8266 D1.Mini (great little device with MANY HATS that stack up)

    The issue is the text DOES show up but of course it's line up wrong. BUT more importantly and get double height when trying the same with 64x48 from WEMOS which has a wonderful kit with the OLED and Two buttons all through I2C (or SPI)

    I'm aware that I have to modify the http://www.espruino.com/modules/SSD1306.­js module and change the OLED_WIDTH and pass the valid 48 height. but I know there must be other changes.
    As you can see from the screenshot below. it's offset is off (easy to fix) but I'm wondering why the double-scan style font?

    Any help would be appreciated. and yes. I went through all the SSD1306 posts. but none were working with this new design.

    I DID get the SSD1306 drivers to work out of the box on this on the ESP8266 with 128x32 integrated OLED From TTGO and HELTEC
    https://www.banggood.com/LILYGO-TTGO-ESP­8266-0_91-Inch-OLED-Display-Module-For-A­rduino-Nodemcu-p-1205904.html

    function start(){
      g.clear();
      g.drawString("Hello",0,0);
        g.drawLine(0, 30, g.getWidth(), 30);
      g.setFontVector(20);
      g.drawString("I love Lily",0,7);
      g.flip();
    }
    
    // HELTEC 128x32
    //let SCL = D5;
    //let SDA = D4;
    
    //D1.Mini
    let SCL = D1;
    let SDA = D2;
    
    // I2C
    I2C1.setup({scl:D5,sda:D4});
    var g = require("SSD1306").connect(I2C1, start, { height : 32 });
    

  • in ESP8266
    Avatar for DamianMontero

    Hopefully I can help in some of the questions or incorrect assumptions:

    1) The ESP8266 does SSL just fine like the ESP32 does. Proof: http://forum.espruino.com/conversations/­330049/#comment14873565

    2) The amazing Gordo has a write up on doing MQTT if this is what you're looking for: https://www.espruino.com/MQTT

    3) If you want instant access and PUSH something to a "web client"(your device is a web client to any server it connects to) you can use websocket. They're fast and easy: https://www.espruino.com/ws

    4) If you want an example of code that will "wait until it connects to wifi successfully and then hit a website" here's my code that does exactly that. http://forum.espruino.com/conversations/­330049/#comment14873565

    Just a heads up: in javascript we don't wait for things. (like pausing until the wifi connects or until a website is downloaded) You CAN use promises but you'll see that most of the code uses just a callback (that's just fancy talk for a function as the last parameterthat runs ONLY once something in the call has finished.

    Good luck. this sounds like a great project.

  • in ESP32
    Avatar for DamianMontero

    There is nothing you have to do on linux to get it working.
    I've have 3 ubuntu boxes and all connect through usb without any changes. some are /dev/ttyUSB0 some are /dev/ttyUSB1 (depending what I connect and when)

    What MOST LIKELY is the case is a cable or port or just blind luck.

    We use to have a saying in support:
    1) Unplug it
    2) blow on it
    3) plug it back in.

    No. dust was never an issue. but it made customers REALLY unplug something and plug it in (sometimes fully, or correctly the second time)

    Can you check if your usb port is dusty?

  • in ESP8266
    Avatar for DamianMontero

    I have used this script for the D1 Mini and NodeMcu Lua ESP8266 ESP-12F (50 times for the 2019 Node Days) and I just wanted to share it with everyone for easy readying:

    esptool.py --port  /dev/cu.wchusbserial1460 --baud 460800 write_flash --flash_freq 80m --flash_mode dio --flash_size 4MB 0x0000 espruino_2v04_esp8266_4mb_combined_4096.­bin 
    

    1) You'll have to download the single "4096" file.
    Here's the latest:
    https://www.espruino.com/binaries/esprui­no_2v04_esp8266_4mb_combined_4096.bin

    2) and of course you'd change the serial port which I have as /dev/cu.wchusbserial1460
    (to find out what is yours. if you're on mac look for /dev/cu.* , linux it's /dev/ttyUSB* and on windows it's usually COM3, COM4 or COM10 look in your "device manager" under "ports")

    3) Remember there is a building in NodeMCU object which will map to the pins in the board so you'd setup access to the D4 pin (which is the built in LED) as:
    let LED1 = NodeMCU.D4;

Actions