pbertie / inkyphat-node

NodeJS Module to control Inky pHAT on Raspberry Pi (e-Paper Screen).
https://www.npmjs.com/package/inkyphat
MIT License
33 stars 1 forks source link

Does this work at all with InkypHAT Black/White? #36

Closed GraemeDBlue closed 7 months ago

GraemeDBlue commented 9 months ago

I've been trying to get this to work on my inkypHAT black/White and all the examples just draw a solid rectangle about 80% of the screen and nothing more or less. What could I be doing wrong? code below

const inkyphat = require('inkyphat')();

async function main() {

  await inkyphat.init();

  // inkyphat.setPixel(1, 5, inkyphat.RED);

  inkyphat.drawRect(50, 100, inkyphat.BLACK);
  // inkyphat.drawRect(150, 20, 210, 60, inkyphat.BLACK);

  await inkyphat.redraw();

  await inkyphat.destroy();
}
main();

Also is there any movement on making text work with this?

pbertie commented 9 months ago

I take it if you change the values in that code it just renders the same 80% rectangle?

When I ported this from the official python code they had two versions, I see they've since got a third version and created a new library to manage it. When they added the yellow one I did try to update this project to allow for this even though I didn't have one of those devices. Now there's another library I think this will be the end of this project and it will just be useful for those with the v2 board still.

GraemeDBlue commented 9 months ago

I take it if you change the values in that code it just renders the same 80% rectangle?

When I ported this from the official python code they had two versions, I see they've since got a third version and created a new library to manage it. When they added the yellow one I did try to update this project to allow for this even though I didn't have one of those devices. Now there's another library I think this will be the end of this project and it will just be useful for those with the v2 board still.

OK yes only the 80% rectangle, and that's a shame as this has potential, I'll try to create a wrapper for the Python lib for my needs thank you for your time.