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.
The library Samsung_16LF01_VFD is fully tested with the following displays:
- Samsung 16LF01UA3
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 :)
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 */
/********************
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);
}