Skip to content

Conversation

@johanoskarsson
Copy link

I recently purchased one of the 13.3" Waveshare displays and I'd love to help add support for it to this package. However I'm not much of a C programmer nor particularly familiar with Node so some hand holding might be required.

I've brought over the code from their drivers here: https://github.com/waveshare/IT8951-ePaper into this PR. I tried my best to adapt the node c file to it.

This does seem to compile but most likely does not work yet. I'm embarrassingly stuck on the node part when trying to test it. How can I run the epaper.js cli from the source directory without installing the package globally? Or even how do I install the package globally from the local directory? It doesn't seem to like that the packages reference the core package using the workspace keyword.

npm -v
8.3.1
$ ~/epaper.js $ npm i packages/cli/ packages/rpi-13in3/
...
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:^

Resources:
https://www.waveshare.com/13.3inch-e-paper-hat.htm
https://www.waveshare.com/wiki/13.3inch_e-Paper_HAT

@samsonmking
Copy link
Owner

Hi @johanoskarsson thanks for your interest in the project! Apologies for the lack of documentation for developers... I recently switched to a monorepo setup, but haven't gotten a change to write up a contributing.md, yet.

The monorepo links the different packages together using pnpm. When developing locally, you should use pnpm instead of npm. To get started...

  1. Install pnpm
  2. Clean out any npm temporary files with something like git clean -xfd
  3. Run pnpm install from the root of the project. This will install all dependencies and symlink all the packages together
  4. Add a link to your new package in the root tsconfig.json
  5. Running pnpm build:clean will compile the typescript for all the packages. You can do an incremental build (only build what changed) by running pnpm build
  6. You can build the c / c++ code for your package by running pnpm build:clean from the root of the packages/rpi13in3 directory. You can build all the typescript code and all the c/c++ code by running pnpm -r build:clean from the root of the project.

Hopefully that's enough to get you started. It looks like this display differs a little from the others we support. When I get some more time over the next few days, I can take a more in depth look at what's required. It should be totally doable, though!

@VictorioBerra
Copy link

@johanoskarsson @samsonmking For what its worth, id love to see this merged in. +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants