Go Down

Topic: Mowayduino and nrf24l01 communication (Read 1 time) previous topic - next topic


May 22, 2014, 11:32 pm Last Edit: May 22, 2014, 11:34 pm by sistemasorp Reason: 1
Is there anybody that can communicate mowayduino robot ( http://moway-robot.com/en/mowayduino/que-es/ ) with nrf24l01  and Mirf library?

I have two parts: the mowayduino sending one string and an arduino uno with a nrf24l01 module receiving that string.

The source code for both is very simple:

Code: [Select]

#include "MowayduinoRobot.h"
#include <SPI.h>
#include <EEPROM.h>

mowayduinorobot robot;
unsigned char datos[8];

void RfDataReady();
void RfDataReady()

void setup()
 datos[0] = 100;
 datos[1] = 101;
 datos[2] = 102;
 datos[3] = 103;
 datos[4] = 104;
 datos[5] = 105;
 datos[6] = 106;
 datos[7] = 107;

void loop()
   if(robot.Send(0x20,datos) == 0)

Arduino UNO:
Code: [Select]

#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>

byte direccion[] = {0x20, 0xc2, 0xc2, 0xc2, 0xc2};

void setup(){
 Mirf.spi = &MirfHardwareSpi;
  Mirf.payload = 10;
 Mirf.channel = 2;

void loop(){
 int indice;
 byte data[Mirf.payload];
 if(!Mirf.isSending() && Mirf.dataReady()){
   Serial.println("Got packet");
   for(indice = 0; indice < Mirf.payload; indice++) Serial.print((char)data[indice]);

After several tests I only receive the string sometimes (with a long time between receptions) and I don't know what more I have to do to achieve a real communication. The connections in Arduino UNO are correct because I can receive the string from another pair of arduino and nrf24l01 .

Go Up