The BARGAIN basement part 1

https://www.conrad.nl/nl/contramoer-m12-polyamide-lichtgrijs-wiska-emug-m12-ral-7035-1-stuks-532262.html?sc.ref=Product%20Details

1 Like

this is the mentioned 2.4 - 128 x 64 display, however the scrolling workes also on the 128 x 32
hope to integrate this lib further in the single channel gateway in a way that you have scrolling frames with info.

2 Likes

yeah Rob, this OLED lib is just amazing such as your project :wink:

1 Like

http://www.ebay.com/itm/Pinboard-Converter-Stable-For-ESP-32S-Wireless-WIFI-Module-/332049488836?hash=item4d4fb11bc4:g:4v0AAOSwImRYP4IZ

US $1.00 incl. shipping

1 Like

if you think 0.91 OLED is to small, and 2.42 is to big, but still want to use that library with all the nice features.
THIS 1.3 oled with a SSH1106 chip also works with a minor tweak in the lib.

3 Likes

I received these ones today. The ad doesn’t speak about size but based on the photo I assumed they would be the same. This is not the case though. Inner diameter is about 4 cm which. Dust sensors don’t fit but they may be nice for MQ sensors.

@BoRRoZ , the 1.3 SH1106 are working out of the box with this lib (actually the best one from my point of view)

yes tnx Charles.

display init code from the provided lib examples

that’s what I meant with ’ minor tweak ’ :wink: choose SSD1306 or SH1106

Ok thanks,

I’ve made a sketch that dynamically select the display based on JSON configuration file, like this you can change display modifying the config file from browser and that it, no need to recompile or flash firmware :wink:

something like this

SD1306Wire * ssd1306 = NULL; // for SSD1306 Instance
SH1106Wire  * sh1106 = NULL;  // for SH1106 Instance
OLEDDisplay * display = NULL; // Display will point on the OLED instance
OLEDDisplayUi * ui = NULL;    // Display User Interface



bool initDisplay(bool force) {
  uint8_t oled_addr;

  // in case of dynamic change of OLED display
  delete ui; 
  delete ssd1306; 
  delete sh1106; 
  ui  = NULL;
  display = NULL;
  ssd1306 = NULL;
  sh1106 = NULL;

  // Config says we want to use it ?
  if (config.mode & CFG_LCD )
  {
    // Clear display configuration to force init
    // and OLED detection
    config.mode &= ~CFG_LCD;

    // default OLED I2C address (0x3C or 0x3D)
    oled_addr = I2C_DISPLAY_ADDRESS;

    // Scan I2C Bus to check for OLED
    if (i2c_scan(oled_addr)) {
      config.mode |= CFG_LCD;
    } else {
      if (i2c_scan(++oled_addr)) {
        config.mode |= CFG_LCD;
      }
    }

    if (config.mode & CFG_LCD) {
      Serial.println(F("Display found"));

      // Instantiate the display
      if (config.oled_type == 1306) {
        ssd1306 = new SSD1306Wire(oled_addr, SDA, SCL);
        display = ssd1306;
      } else if (config.oled_type == 1106) {
        sh1106 = new SH1106Wire(oled_addr, SDA, SCL);
        display = sh1106;
      }

      // We got all fine
      if (display) {
        // Instantiate the User Interface
        ui = new OLEDDisplayUi( display );

        // initialize display
        display->init();
        display->flipScreenVertically();
        display->clear();
        // Display CH2I Logo
        display->drawXbm((128-ch2i_width)/2, 0, ch2i_width, ch2i_height, ch2i_bits);
        display->display();

        display->setFont(ArialMT_Plain_10);
        display->setTextAlignment(TEXT_ALIGN_CENTER);
        display->setContrast(255);
        return true;
      }
    }
  }
  return false;
}


US $3.52 incl. shipping

purpose of this module… connect a gps module to I2C easy :sunglasses:

for mobile equipment …

the ‘w’ version
- https://www.kiwi-electronics.nl/raspberry-pi-zero

1 Like

great!

iDeal caused a time out, and it really took long but with enough patience paypal did work though.

I tested these ‘touch key modules’ and they work very well… tested them behind the lid of a waterproof enclosure… no problem at all !

1 Like

Great suggestion. I had planned to use a reed relais in the waterproof housing to add control to the project.

now you can glue them on one side and on the outside a printed (transparant) selfadhesive with text :wink:
oh… and there is a LED onboard to

combined with this Pololu power switch, you can switch the whole system on/off by touch and even let the processor itself switch the whole system off.

1 Like

What happens when you get water on the case? Maybe mixed with a bit of sediment like a case which has been outside for a long time and then it rains.

2 Likes

good question, I don’t know, have to try this with some water splashed on the enclosure…

ok under the tap and… it switches, that’s not good at all :rage:

1 Like