Skip to main content
Arduino

Return to Revisions

2 of 3
replaced http://stackoverflow.com/ with https://stackoverflow.com/

As most of the people have posted, the values for the pipe are arbitrary, but must follow the rules per the API:

Pipes 1-5 should share the first 32 bits. Only the least significant byte should be unique, e.g.

Before I answer your question, I think an explanation on Hex and Decimal values are needed.

The 40 bit hexadecimal is a number representation of base 16. A decimal is of base 10. So you can convert a Hex Value to Decimal. As this is out of scope for the question, you can google on how to convert from one to another. There are some online converters:

Hex to Decimal Converter

You will see when you convert the Hex value to decimal, that its just a number representation. When you convert, you drop the 0x and LL. As stated the 0x indicates the value is a hex value and LL means type Long Long.

So to answer your question, use the a converter to find a hex number like:

F0F0F0F0A1
F0F0F0F0A2
F0F0F0F0B4
F0F0F0F0E9

Just change the last 2 digits (least significant bit):

Pipes 1-5 should share the first 32 bits. Only the least significant byte should be unique, e.g.
 openReadingPipe(1,0xF0F0F0F0AA);
 openReadingPipe(2,0xF0F0F0F066);

Add the 0x and LL

0xF0F0F0F0A1LL
0xF0F0F0F0A2LL
0xF0F0F0F0B4LL
0xF0F0F0F0E9LL

All should work.

I am no expert on hex, as I am learning, so if I am incorrect, then please someone correct me.

PhillyNJ
  • 1.2k
  • 3
  • 10
  • 20

AltStyle によって変換されたページ (->オリジナル) /