Hi, looking at the GPIO pin table at: mraa/edison.md at master · intel-iot-devkit/mraa · GitHub looks like the pin GP28 has an MRAA number of 8, maybe try value that instead of "32"? (so mraa.Gpio(8)). Based on some notes in this Github issue that looks similar to yours: Illegal arguments for construction of _exports_Gpio Edison on mini breakout with NodeJS · Issue #88 · intel-iot-devkit/m…
sorry thate as old comment about Gp28
I am using J19-4 and J19-5
var InterruptPin = new mraa.Gpio(31)
var InterruptPin2 = new mraa.Gpio(32)
InterruptPin.dir(mraa.DIR_IN) // set the Gpio direction to input
InterruptPin2.dir(mraa.DIR_IN) // set the Gpio direction to input
but I have tried different ones 33,36,40,41
they all give the same error of
Error: Illegal arguments for construction of _exports_Gpio
21.01.17 14:35:12 [-0500] at Error (native)
21.01.17 14:35:12 [-0500] at Object. (/usr/src/app/main.js 17)
21.01.17 14:35:12 [-0500] at Module._compile (module.js:570:32)
21.01.17 14:35:12 [-0500] at Object.Module._extensions..js (module.js:579:10)
21.01.17 14:35:12 [-0500] at Module.load (module.js:487:32)
21.01.17 14:35:12 [-0500] at tryModuleLoad (module.js:446:12)
21.01.17 14:35:12 [-0500] at Function.Module._load (module.js:438:3)
21.01.17 14:35:12 [-0500] at Module.runMain (module.js:604:10)
21.01.17 14:35:12 [-0500] at run (bootstrap_node.js:394:7)
21.01.17 14:35:12 [-0500] at startup (bootstrap_node.js:149:9)
This code was running perfectly till this weekend. code didn't change or any hardware connections
What base image are you using in your Dockerfile? (the `FROM` line)
Can you share the Dockerfile contents?
# Gets latest base image from https://registry.hub.docker.com/u/resin/edison-node/ FROM resin/edison-node:latest # Enable systemd ENV INITSYSTEM on # Copy package.json to root of container # This is copied independently for better caching. COPY package.json /usr/src/app/package.json WORKDIR /usr/src/app # install all npm (node.js) dependencies RUN npm install # Copy our node.js source code into /usr/src/app COPY app/ /usr/src/app # Run the main.js script when the container starts on the device. CMD ["node", "/usr/src/app/main.js"]
This is the docker file
i tried adding mraa to the package.json to get the latest mraa but same issue.
Hi, which version of resinOS are you using? Were these devices newly installed? This would help us narrow down what you have experienced.
I did a fresh install about 5 days ago do to some unrelated corrupt file fissue (docker was not running on the Edison upon boot)so the os image was recent flash. Resin OS 1.21.0
Seems like the edison-node:latest is building the mraa library properly again. Would love to know what changes you made to the script for future reference. What are the best practices to put the application for production use? Are there a recommended tags to follow?
This message was posted on behalf of Intel Corporation
We’d like to help you out on this case unfortunately, since Resin OS is not a supported image, there’s not much we can contribute and it is out of our area of expertise. If you decide to use the supported Yocto image, you can download it from https://software.intel.com/en-us/iot/hardware/edison/downloads
I found however, a couple of links where you can send any questions to the Resin team. Take a look at: