I took a quick look at the second arduino library and that one won’t work for sure as it was written for nRF24L01 chip. The ‘+’ version is backward compatible but my .NET MF driver uses features that were not present in the previous version (like dynamic payload length).
The first library looks promising as it was created for the new version of the chip. For sure it can be used, it’s only a question of configuration. I’m on it
I suggest trying to send from arduino and receive on fez. If this doesn’t work then the oposite From the look of the arduino library source code i suggest something like this:
using System.Text;
using System.Threading;
using GHIElectronics.NETMF.FEZ;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
namespace Gralin.NETMF.Nordic
{
public class Test
{
public static void Main()
{
var fezAddress = new byte[] { 0x0F, 0x0F, 0x0F, 0x0F, 0x0F };
const byte channel = 10;
var spi = SPI.SPI_module.SPI2;
var led = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, false);
var chipSelectPin = (Cpu.Pin)FEZ_Pin.Digital.UEXT5;
var interruptPin = (Cpu.Pin)FEZ_Pin.Interrupt.UEXT10;
var chipEnablePin = (Cpu.Pin)FEZ_Pin.Digital.UEXT6;
var radio = new NRF24L01Plus();
radio.OnDataReceived += data =>
{
Debug.Print("Received = " + new string(Encoding.UTF8.GetChars(data)));
led.Write(!led.Read());
};
radio.Initialize(spi, chipSelectPin, chipEnablePin, interruptPin);
radio.Configure(fezAddress, channel);
radio.Enable();
Thread.Sleep(Timeout.Infinite);
}
}
}
This is just my blank guess based on static code analysis. You may try setting a breakpoint in HandleInterrupt method to see if any interrupts occure when arduino is sending.
Yes that was my guess that in .NET we store the address as byte array and in arduino driver it’s a long so bytes might be reversed. This is why in my sample a used 0x0F0F0F0F0F not to worry about this;) this is propably the only mistake you made in your program?
@ EriSan500 Since those modules give you error detection, retransmission, delivery notification i guess it’s possible. I dont’ know how long would it take to update a FEZ since the speed bottleneck is the managed driver implementation. I think it’s still worth a try…
@ Jay Jay LOL yourself, not all members of this community come from english spoken countries so we are not using acronyms and abbreviations as often as you do.
@ Garlin, I invented in-field update and when the community started calling it IFU I didn’t know what they were talking about. At first it sound like IFU = “I fu@ # you” :wall:
Quote:
"@ Jay Jay LOL yourself, not all members of this community come from english spoken countries so we are not using acronyms and abbreviations as often as you do."
@ Gralin i was Laughing because it took me a week to find out what that meant and it’s clear why. Since it was Gus’s invention and the community abbreviation…
so i was not laughing at you, come on man, we are better than that…
Sorry if i gave the wrong impression…