Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting NRF24L01 #1819

Open
Jenesius opened this issue Mar 24, 2023 · 4 comments
Open

Supporting NRF24L01 #1819

Jenesius opened this issue Mar 24, 2023 · 4 comments

Comments

@Jenesius
Copy link

I looked at the API provided by Johnny-five, but couldn't find any information on working with radios. Are there any examples of working with sensors like NRF24L01. In case I missed a mention of this in the documentation, please open my eyes. Thank you!

@Jenesius
Copy link
Author

const five = require("johnny-five");
const NRF24 = require("nrf24");

const board = new five.Board();

board.on("ready", function() {
  const radio = new NRF24(this, {
    ce: 9,
    irq: 8,
    spi: {
      clock: 1000000,
      device: "/dev/spidev0.0"
    }
  });

  radio.begin();

  radio.printDetails(); 
});

@dtex
Copy link
Collaborator

dtex commented Mar 24, 2023

@Jenesius Johnny-Five doesn't have support for the nRF24, and I doubt it ever will. Even the Nordic site recommends using Bluetooth for new projects.

I always hate when someone responds to a request like this with "You should use X instead", but in this case maybe there is a better option. Can I ask what you are trying to do?

@Jenesius
Copy link
Author

Jenesius commented Mar 24, 2023

@dtex Thnx for fast support!
I want to connect two arduino pro mini using radios: drone and remote control. I check closed issues and dont found something that I can use like example to try repeat.

@dtex
Copy link
Collaborator

dtex commented Mar 24, 2023

Since Johnny-Five requires a host computer running node, it's probably easier to have a radio (or bluetooth or wi-fi) connection to each Arduino in parallel rather than relaying from on Arduino to the next. To that end, Johnny-Five can be used in that scenario using serial over Radio, Bluetooth, or wi-fi. To be honest, that's not part of Johnny-Five, it's something that node-serialport supports. Johnny-Five doesn't care what the serial transport is.

I've used Xbee radios with Johnny-Five in the past and it worked well, but it's been years since I last tried it.

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

No branches or pull requests

2 participants