SPI/I2C OLED display


#261

No datasheet but some more info on the manufactureres site:


"SPI communication or I2C communication can be switched by configuring three resistors R3 R4 R5.

As for IIC communication, it is necessary to move the resistor on R4 to R3, and R5 is soldered with 0 ohm resistor."


#262

I like the remind4 object from @SmashedTransistors but I would have the parameter on 1 line an the value on a separate line. Your approach to do it is smart but a little bit complicated. Would it be possible to modify the remind4 object to display on 2 lines?


#263

Hey guys.

Long time ago I bought a cople of the OLED display, but I don't remember if it was SPI or I2C.

Is there anyway I can find out the type?

I checked the small bags that they came it, they had a number on it, which I googled, but didn't find any answer. I also checked my Ebay purchase history, but it only goes 2 years back, so can not see anything there either, I bough them more than 2 years ago.


#264

if it has 4 pins:
- SCL
- SDA
- VCC
- GND
then it is I2C.

for SPI you would have 6 pins:
- MOSI
- SCK
- CS
- DC
- VCC
- GND


#265

@gonp

Thank you very much, it only have 4 pins, so it must be I2C. That was actually what I was hoping for. Going to try them out for an Ardunio build I am working on :slight_smile:


#266

I managed to isolate the value and display it on another line
outlet_out = c;
outlet_out2 = p;

I will investigate to display only the "prefix" on the other line.

Edit: It's ok now. I have 3 outputs. Chainable. Thanks!


#267

Not so much a question of "is this a bad idea?", but more of a question of "how bad of an idea is this?"

Can I run a single i2c display off of two separate buses (two different wires soldered onto each the SCL and SDA pins) if both are running 3.3v logic? Say for example, I'm using a Teensy sending serial to the Axoloti, and want to use the screen to indicate things on the control side (sending from Teensy i2c bus), and then I want to use a scope object in the Axoloti to view something on screen there, using MIDI to toggle between the screens. Hypothetically the "clear buffer" function of one would wipe the display of the other.

They're both running off of the same power source, share common ground, etc. I know it's not ideal, but is it possible? There's that other thread where someone attached a rotary encoder onto one pin, so I know there are other mad-lads on here :rofl:


#268

Both share the same GND, and since I2C ist open collector / open drain, I see no electrical problems (apart from a slight chance of ground loops), i.e. nothing will burst into flames or go up in smoke.
However, I2C is a single-master bus (well, there are extended specs for multi-master I2C, but I've never seen that work), so connecting two masters (Teensy and Axoloti) can lead to serious confusion and software crashes, unless the I2C implementations are very robust. Each master believes it is the one and only boss on the bus and will send commands whenever it wants and will interpret all other signals on the bus as responses from the slave (the display). So if both happen to send data to the display at approximately the same time, chaos ensues.
So, you can try it, you won't break anything, the results may be fun, but don't expect a reliably working, useful display.


#269

Oh understood, because for some reason I had thought that there wasn't any sort of "return" signal from the OLED, but since the SDA works both ways it sounds like the SDA send of the Teensy/Axo might be returned to the other device. Is it possible to use an i2c multiplexer as a demultiplexer, the way that you can with digital/analog and a 4067 (understanding that they're different protocols)?

Either way, thanks for the answer! If I try this, I'll be sure to post the results here. Should be hilarious.


#270

AFAIK, I2C multiplexers only work the other way around, i.e. to connect one master to several busses. As the multiplexer gets its switching commands via I2C, you can't just connect it "backwards".
But any analog multiplexer (e.g. 4067) should be able to switch I2C.
Also you could use a handshake signal and software to make sure that only one master at a time uses the display.


Software Patch for assigning Hardware display screen
#271

Two ideas (no clue how to achieve this):
1 - Playing arkanoid on axoloti.
2 - Display text moving from left to right or viceversa.(for larger texts).


#272

#273

There's an object called tiar/string/scroll. There's two actually, but "tiar/string/scroll v8" mentions that it scrolls vertically. Try the simple tiar/string/scroll object to see if it works horizontally.