danitool / Samsung_16LF01_VFD

Arduino driver library for the Samsung 16LF01 series 16-segments VFD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Samsung 16LF01 series VFD Library for Arduino

Build Status

Written by Daniele Napolitano, distributed under GPL.

Samsung_16LF01_VFD is an Arduino library designed for displaying characters on Samsung 16LF01 series 16-segments VFD with synchronous serial protocol (like SPI, but with different timing). The API used tries to be compatible with the LiquidCrystal library.

Compatible displays

The library Samsung_16LF01_VFD is fully tested with the following displays:

  • Samsung 16LF01UA3

display_photo

Its known the existence of these Samsung VFD displays with the same Sync Serial protocol:

  • 16LF01UA4 (1x16 character)
  • 9MS09SS1 (1x9 character, 14-segments)

Perhaps other display from Samsung or other manufacturers share the same protocol, let me know :)

Usage

You need to include library header at the beginning of the sketch.

#include <Samsung_16LF01_VFD.h>

The library class inherits the Print class of Arduino, so that you can display texts (not all chars supported) on VFD with standard Arduino functions like this:

vfd.print("Hello, World!";)
vfd.print(foo, DEC);
vfd.print(bar, HEX);
vfd.print(1.23)         // gives "1.23" 
vfd.print(1.23456, 2);  // gives "1.23" 
vfd.println("hello");   // prints "hello" and return to position 0

Besides, it provides unified APIs for initializing and controlling the VFD, as well as some convenient operations.

void begin(uint8_t digits_count, uint8_t brightness); /* initializing */
void clear(); /* clear screen */
void home(); /* set cursor at first digit */
void setCursor(uint8_t pos); /* set current cursor (from 0) */
void setBrightness(uint8_t amount); /* set current display brightness */

Example

/********************
  Pin config:
  
  SCLK = pin 7
  RST  = pin 6
  DATA = pin 5
*********************/

#include <Samsung_16LF01_VFD.h>

Samsung_16LF01_VFD vfd(7, 5, 6);

void setup() {
  vfd.begin(16, 15);
  vfd.print("Hello World!");
  delay(3000);
}

void loop() {
  vfd.print(millis() / 1000);
  vfd.println(" s");
  delay(1000);
}

About

Arduino driver library for the Samsung 16LF01 series 16-segments VFD

License:GNU General Public License v3.0


Languages

Language:C++ 100.0%