I would suggest you edit this question and use the code
format to pretty print your code as it's very hard to follow the way it currently is.
The value for the pipe
variable is an address, more or less the equivalent of your computer IP address: when a message is broadcast into the air all the potential receivers will filter out any message not corresponding to an address they are interested into.
In particular your nRF24L01+ chip is capable to listen for up to 6 addresses.
Another address is the one you use to transmit, so that everybody receiving your message knows who has sent it and to reply to.
So, in your code
radio.openReadingPipe(1,pipe); // pipe value being 0xE8E8F0F0E1LL
means hey, radio, use the second pipe to listen for any message incoming from address 0xE8E8F0F0E1LL, while
radio.openWritingPipe(pipe); // pipe value being 0xE8E8F0F0E1LL
means hey, radio, when sending messages identify yourself with address 0xE8E8F0F0E1LL.
That's the explanation for the pipe
thing and in a short form: those two values in your sketch must match.
Regarding the fact you are not receiving the message, I suggest the following:
- try setting the message payload size to a fixed value with
radio.setPayloadSize(1)
- add a 1uF capacitor short between GND and Vcc on your nRF24 board
- try to use the most reliable configuration which, on the nRF24L01+ is the 250Kbps with maximum PA level by setting
radio.setPALevel(RF24_PA_HIGH); radio.setDataRate(RF24_250KBPS);
Shortening an antenna from its ideal length is not a problem providing you accept and possibly counter the limitations that shortening brings. Here are some words from this site that tell you the story: -
A shortened dipole is simply a dipole antenna that has been shortened.
Since it is shorter than its resonant length, it will not be resonant
and will exhibit both resistance and reactance at the feed point.
Shortened antennas tend to have a capacitive reactance and therefore
need an inductance to cancel the capacitance and bring the antenna
back to resonance. Normally the resistive impedance also drops as the
antenna is shortened, so additional impedance transformation will be
needed to effectively match the antenna.
A shortened dipole will act similar to a full sized resonant dipole in
many ways. The effect of ground will still be important, current will
be maximum in the center and very close to zero at the ends with
maximum voltage at the ends and minimum in the center. If the antenna
is center fed, it will still be balanced, with equal voltage and
current distributions on both legs.
From the principle of conservation of energy, we know that if we can
feed energy into an antenna, it will radiate. We also know that with a
suitable matching network, we can feed power into nearly anything,
including a shortened dipole.
The article goes on to demonstrate how the impedance of the antenna becomes reactive and how the idealized "50 ohm" input resistance becomes significantly less when shortening is done excessively.
Here is another excellent site that explains you can make an antenna from any length.
In short, any length works providing you can get the power into it that you require for transmission. Reciprocity means that a badly shortened antenna works just as "inefficiently" as a transmitter and receiver. There is no silver bullet of length - optimum is quarter, half and full wave antennas but don't let this stop you running the antenna at significantly shorter lengths.
One caution - if you are wanting to transmit several hundred milli-watts or above, not having an ideal antenna (proper length or compensated by matching networks) you may damage your transmitter output stage.
Best Answer
Try CoilCraft - they have this that is suitable for your operating frequency: -
I don't think they can handle much power (1/4 watt say CoilCraft). Insertion loss is 0.7dB which is OK but nothing special. I still believe an air-cored transformer is the best bet.