This repository has been archived on 2022-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
zeropod/src/menu/oled.ts

31 lines
673 B
TypeScript

/*import { openSync } from 'i2c-bus';
import Oled from 'oled-i2c-bus';
import font from 'oled-font-5x7';*/
import { MenuConfig, MenuPrinter } from './interface';
/*const i2cbus = openSync(1);
const opts = {
width: 128,
height: 64,
address: 0x3C,
};
const oled = new Oled(i2cbus, opts);
oled.clearDisplay();
oled.setCursor(1, 1);
oled.writeString(font, 1, "This is a string I am writing to the screen", 1, true);
oled.turnOffDisplay();*/
export class OledPrinter implements MenuPrinter {
private _config: MenuConfig[];
constructor(config: MenuConfig[]) {
this._config = config;
}
public getSelection(): MenuConfig {
return this._config[0];
}
}