Avatar for user80458

user80458

Member since Aug 2017 • Last active Sep 2017
  • 0 conversations
  • 5 comments

Most recent activity

  • in Electronics
    Avatar for user80458

    Yes! It is working! Thanks a lot! Looking forward 1v94!

  • in Electronics
    Avatar for user80458

    g.drawString() still has issue, I removed setFontVector(), the text still can not display on the right side of display. but the g.drawCircle() function works well.
    When I changed the g.setRotation() from 1 to 0, the whole display is working, but text is 90 degree rotated.

     function(err){
            // (optional) fill the internal buffer for all pixels with color white,
            // without this the default color will be black
            display.g.clear(0xFF);
            // not optional - rotate the display x and y coordinates 90 degrees to the right
            display.g.setRotation(0);
            // from here it shows the normal usage
            // set color black for subsequent uses
            display.g.setColor(0x00);
            // set fontsize, see Graphics and Fonts modules for further options
            display.g.setFontVector(12);
            display.g.drawString('Hello World!', 0, 10);
            display.g.drawString('Hello World!', 0, 50);
             display.g.drawString('Hello World!', 0, 100);
             display.g.drawString('Hello World!', 0, 140);
            display.g.drawCircle(40,40,30);
             display.g.drawCircle(40,100,30);
            display.g.drawCircle(40,140,30);
    
  • in Electronics
    Avatar for user80458

    Hi Gorden, the e-ink display is from https://www.smart-prototyping.com/E-ink-­E-paper-new-version-display-module-3.3V-­2.04-inch-177x72.html
    I tried to use g.drawCircle() to display some circle, the result is fine.

            display.g.drawCircle(100,40,30);
             display.g.drawCircle(40,40,30);
            display.g.drawCircle(140,40,30);
    
  • in Electronics
    Avatar for user80458

    Hello Gordon, Thanks a lot! The ink can work now. But I still have an issue there. Only half of the display is working, the other part cannot display correctly. Could you please help?

    The code is exactly the example code from https://www.espruino.com/SSD1606
    Here is the picture for your reference:

  • in Electronics
    Avatar for user80458

    Hello, I'm also trying this e paper display, after I send the demo code to pico, and run save(), the display doesn't work, and with some error:

    save()
    =undefined
    Erasing Flash.....
    Writing.............
    Compressed 81600 bytes to 10333
    Checking...
    Done!
    Uncaught Error: Invalid BPP
    at line 1 col 118
    ...Y,this.display.bpp,{msb:!0});b.clear=­function(a){(new Uint8A...
    in function "grfx" called from line 1 col 364
    ....powerPin;this.g=this.grfx();this.csb­TimeOut=a.clearScreenTi...
    in function "b" called from line 1 col 8
    new b(a)
    in function "connect" called from line 16 col 4
    });
    in function called from system

    here is the code

    // per default turn display off
    digitalWrite(A7, LOW);
    // run following code onInit
    E.on('init', function() {
      // SPI configuration
      var spi = SPI1;
      spi.setup({
        mosi: B5,
        sck:  B3
      });
      // create display instance
      var display = require('SSD1606').connect({
        displayType: 'GDE021A1',
         spi        : spi,
          cs1Pin     : B6,
          dcPin      : B7,
          resetPin   : A5,
          busyPin    : A8,
          bs1Pin     : A6,
          powerPin   : A7
      });
      // activate the power to run the display, just a comfort function, 
      // you can control the power by yourself as well
      display.on();
      display.hwReset(function(){
        display.init(
          function(err){
            // (optional) fill the internal buffer for all pixels with color white, 
            // without this the default color will be black
            display.g.clear(0xFF);
            // not optional - rotate the display x and y coordinates 90 degrees to the right
            display.g.setRotation(1);
            // from here it shows the normal usage
            // set color black for subsequent uses
            display.g.setColor(0x00);
            // set fontsize, see Graphics and Fonts modules for further options
            display.g.setFontVector(20);
            display.g.drawString('Hello World!', 22, 22);
            // from here it shows the needed part
            // (needed) copy internal buffer to display buffer
            display.g.flip();
            // run the display update
            display.refreshScreen(function(err){
              // do whatever you like here, e.g. turn it off when the update is done
              // again just a comfort function
              display.off();
            });
          },
          // clearScreenColor is optional, but prevents e-paper ghosting
          // shadow of an image may be visible after refreshing (only) parts of the screen
          { clearScreenColor: 0x00 }
        );
      });
    });
    

    My firmware got updated.

    Anyone can help? Please :)

Actions