Hi Terry,

> when I type 'sudo pip3 install OLED_Driver', how does PIP find the
> module requested?

Does it find it?  I thought the Waveshare software was obtained through
1.5inch_OLED_Moudle.7z [sic].

> The display type that we have defaults to SPI, which makes it easy (in
> theory) to address the required device, because SPI uses a 'chip
> select' technique driven from the GPIO pins.  The trouble is that
> without documentation I cannot see how to change the identity of the
> GPIO pins to be used to address each device.

Alongside OLED_Driver.py is DEV_Config.py which it imports and uses
heavily in OLED_Reset(), OLED_WriteReg(), and OLED_WriteData().

DEV_Config.py includes

    OLED_RST_PIN = 25
    OLED_DC_PIN  = 24
    OLED_CS_PIN  = 8

    SPI = spidev.SpiDev(0, 0)
    SPI.max_speed_hz = 20000000
    SPI.mode = 0b00

https://luma-oled.readthedocs.io/en/latest/hardware.html#spi
details pins used and it tallies with the above.  It also says

    Because CS is connected to CE0, the display is available on SPI
    port 0.  You can connect it to CE1 to have it available on port 1.
    If so, pass port=1 in your serial interface create call.

And I would guess it's referring to those ‘0, 0’ passed to
spidev.SpiDev() above which probably arrive at
https://github.com/doceme/py-spidev#methods open():

    Connects to the specified SPI device, opening
    /dev/spidev<bus>.<device>

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-09-01 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to