Ben Dixon
Published © GPL3+

OLED Name Tag using XinaBox and Arduino

I built this little OLED name tag for events. It's really cool and can impress who-ever you meet. All built using XinaBox ☒CHIPS.

BeginnerFull instructions provided6 minutes1,208
OLED Name Tag using XinaBox and Arduino

Things used in this project

Hardware components

XinaBox OD01 ☒CHIP
☒CHIP 128x64 Pixel OLED Display
×1
XinaBox PB02 ☒CHIP
CR2032 Coin Cell Battery Power
×1
XinaBox CC03 ☒CHIP
☒CHIP 32-bit ARM® Cortex®-M0+ processor
×1
XinaBox IP03 ☒CHIP
☒CHIP interface for SWD, JTAG and SPI programmers with USB port
×1
XinaBox XC10 ☒BUS Connector
☒BUS connectors
×1
XinaBox - XC55
×1
CR2032 Coin Cell Battery
×1
Lapel Badge Magnet or Similar
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

OD01 Name Tag

Arduino
This code is used in an Arduino sketch (.ino file) to run the project.
#include <xCore.h>
#include <xOD01.h>

void setup() {
  // Start I2C bus
  Wire.begin();

  // Start OLED
  OLED.begin();

  //Print your name on the tag
  print_name("BEN DIXON");
}

void loop() {
  //Nothing needed here
}

void print_name(String your_name)
{
  //Clears the OLED to take away anything previously displayed.
  OD01.clear();

  //Set to large font size and print first line
  OD01.set2X();
  OD01.println("HELLO");

  //Print next line
  OD01.println("my name is");

  //Set to smaller font size to print a space
  OD01.set1X();
  OD01.println();
 
  //Set to large font size and print name
  OD01.set2X();
  OD01.println(your_name);
}

Credits

Ben Dixon

Ben Dixon

5 projects • 12 followers
I am an electronic engineer with a true love for the art of electronics. I live for anything technology. Yes, I'm a geek just like you!

Comments