thiagorp / bbb-nrf24l01 Goto Github PK
View Code? Open in Web Editor NEWnrf24l01 javascript library for beaglebone black, and possibly other embedded systems
nrf24l01 javascript library for beaglebone black, and possibly other embedded systems
I modified /usr/local/lib/node_modules/bonescript/my.js around line 57:
if (!slot) {
if(debug) winston.debug('Failed to write device tree fragment to slots. name: ' + name);
}
else if(slot[0]) {
My simple test program:
var nrf = require('bbb-nrf24l01');
nrf.spiDev = '/dev/spidev1.0'; // This always needs to be the first property to be set
nrf.channel = 0; //0 - 127 and 0 - 84 in the US
nrf.payload = 4; //Size in bytes of the payload
nrf.address = 'serve'; //Address for receiving messages (Must be 5 bytes long)
nrf.startReceiving();
console.log("receiving...");
if (nrf.dataReady()) {
var data = nrf.getData(); // Returns a Buffer object with the data received
}
When I run it I get:
error: Failed to find devicetree fragment: bspm_P9_17_f
info: 0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPIDEV0
8: ff:P-O-L Override Board Name,00A0,Override Manuf,bspm_P9_16_f
info: Error loading devicetree overlay for P9_17 using template bspm
error: Unable to write to /sys/class/gpio/gpio5/value
./ ../ export gpio115@ gpio117@ gpio51@ gpiochip0@ gpiochip32@ gpiochip64@ gpiochip96@ unexport
I'm not sure why gpio5 is being used. It's as if the mode isn't set right. We should be using mode 0, but if we were in mode 7 then it would be gpio0[5](instead of mode 0 spi0_cs0).
I'm assuming the device tree config for BB-SPIDEV0 sets the pins into mode 0?
Any suggestions?
Thanks!
7390 verbose stack at ChildProcess.emit (events.js:110:17)
7390 verbose stack at maybeClose (child_process.js:1019:16)
7390 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1091:5)
7391 verbose pkgid [email protected]
7392 verbose cwd /root
7393 error Linux 3.8.13-bone79
7394 error argv "node" "/usr/bin/npm" "install" "bbb-nrf24l01"
7395 error node v0.12.13
7396 error npm v3.8.5
7397 error code ELIFECYCLE
7398 error [email protected] install: node-gyp rebuild
7398 error Exit status 1
7399 error Failed at the [email protected] install script 'node-gyp rebuild'.
7399 error Make sure you have the latest version of node.js and npm installed.
7399 error If you do, this is most likely a problem with the spi package,
7399 error not with npm itself.
7399 error Tell the author that this fails on your system:
7399 error node-gyp rebuild
7399 error You can get information on how to open an issue for this project with:
7399 error npm bugs spi
7399 error Or if that isn't available, you can get their info via:
7399 error npm owner ls spi
7399 error There is likely additional logging output above.
7400 verbose exit [ 1, true ]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.