Correct syntax for using multiple OLEDs under the Adafruit ssd1306 library


i tried looking example sketch there doesn't appear on net regarding 2 spi oleds running off 1 avr.  if there haven't found suppose.

i've ganged vcc, gnd, d/c, mosi, clk between 2 oleds , 1 wire each going nano.  chip select have individually coming each oled different digital pin.  problem how setup 2 oleds in software , call functions each of them see fit.  right now, example sketch contains constructor works fine 1 oled can't figure out how define , use one.

can give me basic syntax setup 2 oleds run , how switch between display variables?  assume set cs of 1 low , cs of other high , switch between calling variable called display1 , display2 call methods or compiler didn't that.

adafruit_ssd1306 display(oled_mosi, oled_clk, oled_dc, oled_reset, oled_cs);

adafruit_ssd1306 display2(oled_mosi, oled_clk, oled_dc, oled_reset, oled_cs2);

where cs , cs2 chip select pins.


Arduino Forum > Using Arduino > Project Guidance > Correct syntax for using multiple OLEDs under the Adafruit ssd1306 library


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'