3

I'm trying to figure out how to use johnny-five with raspberry-pi board.

Since the library that they recommend on johnny-five http://johnny-five.io/examples/raspi-io/ which is raspi-io is no longer up-to-date for the current version of node.

When I tried to install raspi-io, it gave me the unresolved dependencies as well as Error: Cannot find module 'raspi-io'

I'm kind of stuck and don't know how to deal with this since I'm working on a project that include light toggling.

Thank you so much for any help.

An Trieu
  • 41
  • 1

1 Answers1

0

I assume that you have tried to npm install the package on your local computer. This can't work.

The raspi-io package is only available on the Raspberry Pi as it is made for the RasPi GPIO interface and the ARM architecture. You can not npm install it on your local development environment that is neither ARM nor has the GPIO interface.

You can install it directly on your RasPi though.

If you have your development environment on your local computer, you can manually add the entry to your package.json, then copy that to the RasPi and run npm install there. Then you can copy back the updated package-lock.json to your local computer and commit it to the repo.

Fred
  • 1,103
  • 2
  • 14
  • 35