Avatar for user71789

user71789

Member since Dec 2016 • Last active Feb 2017
  • 4 conversations
  • 16 comments

Most recent activity

  • in Electronics
    Avatar for user71789

    Hi @allObject & @Gordon, thank you for your input, I found that there were an error in the mapping of the display in the code example:

    var display = require('SSD1606').connect({
        displayType: 'GDE021A1',
       spi        : spi,
          cs1Pin     : B6,
          dcPin      : B7,
          resetPin   : A5,
          busyPin    : A8,
          bs1Pin     : A6, 
          powerPin   : A7  
      });
    

    and when I added a simple digitalWrite in the init method, it actually worked.

  • in Electronics
    Avatar for user71789

    Gordon, I tried to unplug the 3.3v > A7 but without any luck, nothing happend.

    I would imagine, that when I run this methode

    // per default turn display off
    digitalWrite(A7, LOW);
    

    then I turn off the display, but this is not the case.

    Any other suggestions ... please:)?

  • in Electronics
    Avatar for user71789

    Hi guys,
    I just got my e paper from http://www.smart-prototyping.com/E-ink-E­-paper-new-version-display-module-3.3V-2­.04-inch-177x72.html?search=e%20paper

    And I've been following this great tutorial http://www.espruino.com/SSD1606

    When I plug in the Pico, the blue LED on the epaper lights up, so there are connection.

    Only problem is, that when I save this to the pico and also write save(); nothing happens on the display

    // 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   : A8,
        busyPin    : A5,
        bs1Pin     : A6, // optional, but if not provided, you need to set the correct SPI mode 4-wire by yourself
        powerPin   : A7  // optional, just do not use the on() or off() function if you do not provide it
      });
      // 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 }
        );
      });
    });
    

    And I get this in the IDE

    >save()
    =undefined
    Erasing Flash.....
    Writing.............
    Compressed 81600 bytes to 10374
    Checking...
    Done!
    
    • 14 comments
    • 331 views
  • in Interfacing
    Avatar for user71789

    This is SOOO awesome, thanks @ClearMemory041063 and @luwar for your help!

  • in Interfacing
    Avatar for user71789

    @luwar, thanks a million just what I needed. And for the button to work, is that "3" ... if so, where does this go on the Pico?

  • in Interfacing
    Avatar for user71789

    Hi Spocki, thank you, this looks right. I dont need the LEDs, only the rotate and button functionality. Do you know how I connect it to the Pico?

  • in Interfacing
    Avatar for user71789

    ClearMemory041063 I dont know, this was just how I read your suggestion, does it look right? I haven't got my breadboard yet, so before I go solder anything, I would like to know if it's right:)

  • in Interfacing
    Avatar for user71789

    Hi ClearMemory041063
    Thanks a lot for all your help, I really appreciate you spending time on this. I've tried to connect the two components in a diagram:

    https://drive.google.com/file/d/0B-qOFGz­MJqfYSmxUY3ZzbjRvZVU/view?usp=sharing

Actions