Introduction: Digital Bulletin Board


The DIY Digital Notice Board for Elevators gives you the

In this tutorial, we'll guide you through the process of creating your own digital notice board for elevators using a Monochrome OLED 0.96" 128x64 OLED Graphic Display with a STEMMA QT connector. This project includes a rotary switch to navigate between different floors, making it a convenient and modern way to convey information in a building's lift.

Supplies

  • Monochrome OLED 0.96" 128x64 OLED Graphic Display with STEMMA QT
  • Rotary switch
  • Adafruit Metroboard or compatible microcontroller
  • Jumper wires
  • Breadboard
  • Power supply (USB cable or batteries)
  • Enclosure : Acryllic sheets, Nuts & Bolts, Repurposed Dial

Collect all the necessary components mentioned above. Make sure the OLED display has the STEMMA QT connector for easy wiring.

Step 1: Wiring

Connect the components on the breadboard as follows:

OLED Display

  • GND goes to ground
  • Vin goes to 5V 
  • Data to I2C SDA (on the Metroboard, this is A4)
  • Clk to I2C SCL (on the Metroboard, this is A5)
  • RST to digital 4


  • Connect the rotary switch to the appropriate pins on the Metroboard/ Arduino Uno. Typically, these are digital input pins.
  • Check the Serial Monitor to identify active switch positions


Step 2: Install Arduino IDE and Libraries

If you haven't already, download and install the Arduino IDE from the official website. Open the IDE, go to the Library Manager, and install the necessary libraries for your OLED display. Search for libraries such as "Adafruit SSD1306" and install them.

Step 3: Write the Code

The following Arduino sketch displays text information on the OLED display based on the selected floor from the rotary switch. Use the Adafruit libraries to control the OLED display.

#include <Wire.h>

#include <Adafruit_GFX.h>

#include <Adafruit_SSD1306.h>


#define SCREEN_WIDTH 128 // OLED display width, in pixels

#define SCREEN_HEIGHT 64 // OLED display height, in pixels


#define ROTARY_SWITCH_PIN_1 3

#define ROTARY_SWITCH_PIN_2 5

#define ROTARY_SWITCH_PIN_3 6

#define ROTARY_SWITCH_PIN_4 8

#define ROTARY_SWITCH_PIN_5 13


Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, 4);


void drawText(const char* text);


void setup() {

Serial.begin(9600);


if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3D)) {

Serial.println(F("SSD1306 allocation failed"));

for (;;)

; // Don't proceed, loop forever

}


pinMode(ROTARY_SWITCH_PIN_1, INPUT_PULLUP);

pinMode(ROTARY_SWITCH_PIN_2, INPUT_PULLUP);

pinMode(ROTARY_SWITCH_PIN_3, INPUT_PULLUP);

pinMode(ROTARY_SWITCH_PIN_4, INPUT_PULLUP);

pinMode(ROTARY_SWITCH_PIN_5, INPUT_PULLUP);


// Your other setup code...

}


void loop() {

display.clearDisplay();


int switchValue = 0;


if (digitalRead(ROTARY_SWITCH_PIN_1) == LOW) switchValue = 1;

else if (digitalRead(ROTARY_SWITCH_PIN_2) == LOW) switchValue = 2;

else if (digitalRead(ROTARY_SWITCH_PIN_3) == LOW) switchValue = 3;

else if (digitalRead(ROTARY_SWITCH_PIN_4) == LOW) switchValue = 4;

else if (digitalRead(ROTARY_SWITCH_PIN_5) == LOW) switchValue = 5;


switch (switchValue) {

case 1:

Serial.println("Switch Position: 1");

drawText("SVA'S Joint Info Session, \n(5-9 PM)");

break;

case 2:

Serial.println("Switch Position: 2");

drawText("VFL - Making Studio \nwith Becky Stern");

break;

case 3:

Serial.println("Switch Position: 3");

drawText("Design Narrative - \nScript Doctor Night \n(10 - 1PM)");

break;

case 4:

Serial.println("Switch Position: 4");

drawText("Riso Lab \nOrientation Session \n(2 to 5PM)");

break;

case 5:

Serial.println("Switch Position: 5");

drawText("Wish Julia a Happy \nBirthday at the front desk - \n(Allday)");

break;

default:

Serial.println("Unknown Switch Position");

// Handle any other switch positions if needed

break;

}


display.display();

delay(5000); // Adjust the delay as needed

}


void drawText(const char* text) {

display.setTextSize(1.5);

display.setTextColor(SSD1306_WHITE);

display.setCursor(0, 0);

display.println(text);

display.display();

}

Step 4: Customize Information

  • Modify the code to display specific information for each floor. You can add conditional statements or switch-case constructs to customize the text based on the selected floor.
  • Connect the Adafruit Metroboard to your computer and upload the code using the Arduino IDE.
  • Power up your Metroboard setup, rotate the rotary switch to simulate different floors, and ensure that the OLED display updates accordingly with the relevant information.

Step 5: Building an Enclosure

While building the enclosure, we needed to keep in mind the fact that it needed to be mounted. Material Used for the enclosure here are, Quarter-inch acryllic, a repurposed circular dial, nuts and bolts (for mounting) and cut vinyl stickers for indications and markings.