Results 1 to 4 of 4

Thread: How to use nrf24l01 wireless module with Arbotix-M Robocontroller & Arduino Mega 2560 r3 to communicate between each other?

  1. Question How to use nrf24l01 wireless module with Arbotix-M Robocontroller & Arduino Mega 2560 r3 to communicate between each other?

    Arbotix-M is using
    Code:
    static const uint8_t SS   = 4;
    static const uint8_t MOSI = 5;
    static const uint8_t MISO = 6;
    static const uint8_t SCK  = 7;
    Click image for larger version. 

Name:	icsp_pinout1.png 
Views:	24 
Size:	5.4 KB 
ID:	7467
    I am using TMRh20 nrf24 Arduino library (https://github.com/nRF24/RF24) which is working fine when I use it with my Arduino boards as transmitter and receiver.

    I want to use nrf24 to communicate between my Arduino Mega 2560 and Arbotix-m which Arduino Mega 2560 will be transmitter and Arbotix-M will be act receiver.

    In nrf24, we need to write CE and CSN pins which pins 7-8 or pins 9-10 are commonly used in Arduino boards while using the TMRh20 nrf24 or other libraries. However, for Arbotix-M, which pins do I need to use ? I tried a few pins for CE and CSN and I wired the MISO, MOSI and SCK pins as I indicated above too; but I cannot make the communication between Arbotix-M and Arduino Mega 2560.

    I couldn't find any information in Internet about
    "How to use nrf24l01 wireless module with Arbotix-M Robocontroller & Arduino Mega 2560 r3 to communicate between each other?".

    Thus, I came here to ask in forums. Would you help me to solve this issue please? I don't know where to ask and learn to fix this issue. I will be very happy if someone guides me, thank you very much.

  2. #2

    Re: How to use nrf24l01 wireless module with Arbotix-M Robocontroller & Arduino Mega 2560 r3 to communicate between each other?

    You need to make the appropriate connections to the NRF chip, which includes the SPI bus and the chip-enable signal.
    Any available digital pin "ought" to work for Chip Enable -- it's a low-bandwidth digital on/off signal.
    However, the library you're using may put additional requirements on which signal you choose. You need to read the source code for the library to figure out what it's doing.

  3. Re: How to use nrf24l01 wireless module with Arbotix-M Robocontroller & Arduino Mega 2560 r3 to communicate between each other?

    There is nothing useful in library if you don't know where to look and what to do. I checked the library and there is no such info you mentioned to modify in the library of TMRh20 nrf24 Arduino library (https://github.com/nRF24/RF24).

    It is very strange that noone has ever done to connect a nrf24 module to ArbotixM to communicate between another ArbotixM or Arduino Mega 2560 before.

    I will be very happy if anyone knows how to do this, thank you.

  4. #4

    Re: How to use nrf24l01 wireless module with Arbotix-M Robocontroller & Arduino Mega 2560 r3 to communicate between each other?

    Warning these days I don't do much of anything with the Arbotix M boards (most of the ones I have are gathered up in a box in my cabinet...) Likewise I also don't do anything with Arduino Megas other than one which I use to test some stuff with the USB Host Shield 2...

    Also as I have mentioned in many postings, I personally no longer do anything using the standard Trossen release with Arduino 1.0.4, I only use some of the other installs setup by either myself or Tician... Which run on the current versions of Arduino...

    These days, I do most of the stuff with either Robotis products like OpenCM9.04 boards or with boards that I have done myself using Teensy 3.x processors by PJRC...

    Also have not done much with nrf24... Have played more with some of the other nrf chips. LoRa 95...

    But if you for example look at the Sparkfun hookup guide that might give you some suggestions:
    https://learn.sparkfun.com/tutorials...r-hookup-guide

    On The Arbotx Boards, the SPI pins are:
    static const uint8_t SS = 4;
    static const uint8_t MOSI = 5;
    static const uint8_t MISO = 6;
    static const uint8_t SCK = 7;

    So should use Hardware SPI. I have not checked in a long time if this will default back to using the SPI library that is installed by the Arduino AVR install? If so it supports transactions, if not... I have not looked through this code well enough to know if it is using the library fully or if it is trying to output directly to registers.


    As @jwatte mentioned, I believe that you should be able to use most any other digital pin as I don't think they do anything special with them.

    However there may be other gotchas. Example With some of the example apps, I see things like:
    attachInterrupt(0, check_radio, LOW); // Attach interrupt handler to interrupt #0 (using pin 2) on BOTH the sender and receiver

    The problem is this assumes that pin 2 is interrupt 0... Which it may not be on the Arbotix Board.
    Normally it is preferred to use the digitalPinToInterrupt macros to do the mapping like:
    attachInterrupt(digitalPinToInterrupt(2), check_radio, LOW); //(recommended)

    But I don't know if the digitalPinToInterrupt was defined for Arbotix...

    So again maybe several other gotchas

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can I replace ARbotix with Arduino Mega 2560?
    By greatdsa in forum Arbotix, Microcontrollers, Arduino
    Replies: 1
    Last Post: 01-22-2018, 03:40 PM
  2. Question(s) ArbotiX-M robocontroller can communicate multiple robots using API zigbee protocol?
    By ddugi79 in forum Arbotix, Microcontrollers, Arduino
    Replies: 1
    Last Post: 10-01-2014, 09:39 AM
  3. Arduino Mega 2560 and Serial Comunication issues
    By DVS in forum Arbotix, Microcontrollers, Arduino
    Replies: 3
    Last Post: 07-10-2013, 02:31 PM
  4. Arduino Mega 2560 and AX12A servos
    By DVS in forum DYNAMIXEL & Robot Actuators
    Replies: 3
    Last Post: 07-08-2013, 04:26 PM
  5. Arduino Mega 2560 and AX12A servos
    By DVS in forum Sensors
    Replies: 1
    Last Post: 07-08-2013, 04:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •