1.0.0-beta.12 • Published 4 months ago

jlc-slomo-elite v1.0.0-beta.12

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

JL Cooper SlomoElite Library

Example code

async function run() {
  const jlc = new JLCSlomoElite('COM4');

  await jlc.open();

  await jlc.clear();

  await jlc.writeText('Jojo!', { fontSize: FontSize.Large, inverted: false, x: 10, y: 10, spacing: 1});

  console.log(await jlc.requestSystemInfo());

  await jlc.setShuttleMode(ShuttleMode.Automatic);
  await jlc.setTBarResolution(TBarResolution.Bits10);
  await jlc.drawObject(ObjectType.FilledRectangle, { x: 10, y: 100, width: 100, height: 100 }, 1, false);
  
  /* Render some pixels to back buffer */
  await jlc.setRenderMode(RenderMode.RAM);
  const pixels = new Uint8Array(300 * 4).fill(0xff);

  await jlc.drawPixels(0, 0, 300, pixels);
  await jlc.requestTransferRAMToDisplay();

  /* Transfer complete, reset render mode */
  await jlc.setRenderMode(RenderMode.Display);

  setInterval(() => {
    jlc.writeText(`${Date.now()}`, { fontSize: FontSize.Medium, inverted: false, x: 10, y: 30, spacing: 1});
  }, 1000);

}

run().catch(console.error);
1.0.0-beta.12

4 months ago

1.0.0-beta.11

10 months ago

1.0.0-beta.10

10 months ago

1.0.0-beta.6

1 year ago

1.0.0-beta.7

1 year ago

1.0.0-beta.8

12 months ago

1.0.0-beta.9

11 months ago

1.0.0-beta.2

1 year ago

1.0.0-beta.3

1 year ago

1.0.0-beta.4

1 year ago

1.0.0-beta.5

1 year ago

1.0.0-beta.1

1 year ago

1.0.0

1 year ago