Giter VIP home page Giter VIP logo

Comments (10)

mikegleasonjr avatar mikegleasonjr commented on May 14, 2024 2

@maruel I picked up the device again and found the problem this time.

I looked at how the device was initialized with the adafruit python library (https://github.com/adafruit/Adafruit_Python_SSD1306/blob/master/Adafruit_SSD1306/SSD1306.py#L309). I found a mismatch here https://github.com/google/periph/blob/master/devices/ssd1306/ssd1306.go#L207.

So I replaced...

0xDA, 0x12, // Set COM pins hardware configuration; see page 40

with...

0xDA, 0x02, // Set COM pins hardware configuration; see page 40

And now the display is working properly:

img_20171116_212949

There is no public interface to send commands directly to the display, what do you propose to make something flexible so I can make it work?

from periph.

mikegleasonjr avatar mikegleasonjr commented on May 14, 2024 1

I found out how to do it:

if err = c.Tx(0x3C, []byte{
    0x00, // I²C transaction has stream of command bytes
    0xDA, // set comm pins
    0x02, // 2
}, nil); err != nil {
    return nil, err
}

I am going to close it now :)

from periph.

maruel avatar maruel commented on May 14, 2024 1

No worries. :) Reopening because this is a bug.

So clearly the COM pins configuration needs to either have more conditions or be made configurable. I think we'll need the later as this really depends on the hardware configuration. :/ Expanding on the doc which isn't that clear;

Bits

  • 5 enables top and bottom panel swap
  • 4 enables alternative each side instead of using two subpannels

This is coupled with C0/C8:

  • C0 means bottom-top
  • C8 means top-bottom

It is used to rotate the display.

So we'll need an enum to clarify the above in a way that keeps the rotated functionality working (which I'd prefer if possible).

from periph.

maruel avatar maruel commented on May 14, 2024 1

FTR, I still want to fix this, I just need to figure out the best way to expose the bit.

from periph.

maruel avatar maruel commented on May 14, 2024

Interesting. Can you try changing this line:
https://github.com/google/periph/blob/master/devices/ssd1306/ssd1306.go#L207
to 0xDA, 0x02, ?

from periph.

mikegleasonjr avatar mikegleasonjr commented on May 14, 2024

@maruel nope, same problem.

I don't know if it is relevant/interesting or not but... if I try with -h 32 on the 128x64 display, it displays on the bottom half of the screen (like 1st screenshot, but on the 128x64 device)

from periph.

mikegleasonjr avatar mikegleasonjr commented on May 14, 2024

@maruel I feel silly, that was your proposed diagnosis the first time!

from periph.

maruel avatar maruel commented on May 14, 2024

I'm starting to think about v3, this should be fixed in time for this release, which will likely be in a few months.

from periph.

mikegleasonjr avatar mikegleasonjr commented on May 14, 2024

@maruel thanks! in the meantime I have a workaround so that's great

from periph.

mikegleasonjr avatar mikegleasonjr commented on May 14, 2024

Thank you very much!

from periph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.