nRF24L01+ Module Documentation

nRF24L01+

Library

Arduino Library Download
Copy to ‘Libraries’ folder within your main Arduino folder.

Pins:

MISO -> 12
MOSI -> 11
SCK -> 13

Configurable:

CE -> 8
CSN -> 7

Properties:

byte cePin
CE Pin controls RX / TX, default 8.

byte csnPin
CSN Pin (Chip select not), default 7.

byte channel
RF Channel 0 – 127 or 0 – 84 in the US, default 0.

byte payload
Size in bytes, default 16, max 32.
Note: channel and payload must be the same for all nodes.

Methods:

void init(void)
Initialize the module, set the pin modes for the configurable pins and initialize the SPI module.
Example:
Mirf.csnPin = 9;
Mirf.cePin = 7;
Mirf.init();
void setRADDR(byte *addr)
Set the receiving address. Addresses are 5 bytes long.
Example:
Mirf.setRADDR((byte *)"addr1");
void setTADDR(byte *addr)
Set the sending address.
Example:
Mirf.setTADDR((byte *)"addr1");
void config(void)
Set channel and payload width. Power up in RX mode and flush RX fifo.
Example:
Mirf.payload = 32;
Mirf.channel = 2;
Mirf.config();
bool dataReady(void)
Is there data ready to be received?.
Example:
if(Mirf.dataReady()){
//Get the data to play with.
}
void getData(byte *data)
Get the received data. 'data' should be an array of bytes Mirf.payload long.
Example:
byte data[Mirf.payload]
Mirf.getData(data);
void send(byte *data)
Send data. 'data' should be Mirf.payload bytes long.
bool isSending(void)
Return true if still trying to send. If the chip is still in transmit mode then this method will return the chip to receive mode.
Example:
Mirf.send(data);
while(Mirf.isSending()){
//Wait.
}
//Chip is now in receive mode.
NB: Lots more information is available from the status registers regarding acknowledgement or failure status. See Mirf.cpp:218.
bool rxFifoEmpty(void)
Is the RX Fifo Empty.
bool txFifoEmpty(void)
Is the TX Fifo Empty.
byte getStatus(void)
Return the status register.
void powerUpRx(void)
Power up chip and set to receive mode. Also clear sending interrupts.
void powerUpTx(void)
Power up tx mode.
Exa

Examples

See examples folder in zip file.
Arduino Library Download

Advertisements

I’m attempting to replicate this project, and hopefully, I’ll turn it into a neat little software-defined radio for 2m, 1.25m, and 70cm. We shall see shortly.

Hackaday

For Christmas, [Lior] received a Baofeng UV5R radio. He didn’t have an amateur radio license, so he decided to use it as a police scanner. Since the schematics were available, he cracked it open and hacked it.

This $40 radio communicates on the 136-174 MHz and 400-480 MHz bands. It uses a one-time programmable microcontroller and the RDA1846 transceiver. With the power traces to the MCU cut, [Lior] was able to send his own signals to the chip over I2C using an Arduino. He also recorded the signals sent by the stock microcontroller during startup, so that he could emulate it with the Arduino.

Once communication was working on an Arduino, [Lior] decided to get rid of the stock microcontroller. He desoldered the chip, leaving exposed pads to solder wires to. Hooking these up to the Arduino gave him a programmable way to control the device. He got his radio license and…

View original post 59 more words

Building A Thermostat Using Arduino

This gives an excellent description of the technique. I’ve still yet to determine the switching current, which I’d like to before I build a potentially hazardous item. End goal of this project? Constructing a ‘Nest’-like learning thermostat. Mostly just to predict when I’ll come stomping in from the cold, and adjust the temperature appropriately an hour or two ahead of schedule.

Keeps it toasty.

Concept 3 built and the site going Live!!

We need this, check it out.

Concept 3 built and the site going Live!!.

Teensy (The once and future king) Model 3.0

ImageThis thing is epic embodied. Go ahead and contact Mr. Teensy Himself on Twitter and tell him how appreciative you are. Because it won’t be long before these things are everywhere. With an ARM Cortex-M4 processor and an independent IC for the bootloader, it’s quite resilient to bricking (necessary for me!) native USB, what else is to be expected from PJRC

Oh yeah, and fully working Arduino bootloader and libraries for everyone who doesn’t want to program in C/C++. This is going to be big. Paul claims they easily overclock to 96MHz, and combined with a 32-bit processor, that’s a lot of computing power. Not to mention the 32bit analogWrite() (billions of levels of precision) and 13bit analogRead() (65536 levels of read, or down to a 134uV precision per level. Compare that to a Arduinos’ precision of 19mV, or 4.2mV for the Mega with the 1v1 voltage reference.

So…basically stoked. Get it here for the next day or so.

P.S. Of course, the Kickstarter for this thing was fufilled basically instantly. I mean, we all have the Teensy 2.0, right?

UPDATE: Galago is fully-funded!

http://www.kickstarter.com/projects/kuy/galago-make-things-betterImage

As of this morning (15 September) this Kickstarter had reached $30 000 in funding, and as such will be produced. So begins the debate on whether or not to order a few more…

In any case, hopefully Kuy can get these built relatively quickly and the development environment pans out as described. If not, I’ve got plenty of nights and weekends to try and write my own bootloader/toolchain.

Galago, a ARM Cortex-M3 development board with a real time debugger!

http://www.kickstarter.com/projects/kuy/galago-make-things-better

ImageWhat a great find for $19. Half the price of a Arduino (from radio shack, at least, I go with the chinese knockoffs for $17) and orders of magnitude more capability. Too great to pass up, I swung for one. Here’s the bad news, unless they sell $30k worth, they don’t get any of the funding. And, there’s only 17 days to go. Hopefully they can pull this one out of their ass, get funded and give PJRC and their new Teensy 3.0 a run for their money.

Blog at WordPress.com.

%d bloggers like this: