Closed Guttata closed 6 years ago
This error:
TypeError: exists is not a function
is very similar to jperkin/node-rpio#53, i.e. trying to run node-rpio inside a browser context. Is this what you're trying to do? That's not going to work. node-rpio needs to run directly on the hardware.
Hi thanks for the quick reply. I think you are right.
I will implement a server / client WebSocket to workaround this.
Hi! The implementation of your websocket application may be a nice example for other people like you, who want to get the gpio pins accessable from the web.. maybe @jperkin would include it, if you create a small pull request
Hi everyone,
I'm pretty new to nodejs. I'am building an app using create react app tool. I installed rpio with "npm install -s rpio". The dependancy is written in package.json. The rpio folder is well created inside _/nodemodules.
I created a DriveController.js with :
I import this file inside DrivingMode.js with
"import MoveForward from './DriveController';"
and then in my code i call the MoveForward() function.I got the following warnings at build with
npm start
commandand when the MoveForward() function is executed it crashes with :
I don't understand the problem with the line
var binding = require('bindings')('rpio');
in rpio.jsIf i run DriveController.js alone with
node DriverController.js
it's working well.Thanks for your help.