Shop OBEX P1 Docs P2 Docs Learn Events
Nordic nRF24L01+ BS2 Code example — Parallax Forums

Nordic nRF24L01+ BS2 Code example

Ron CzapalaRon Czapala Posts: 2,418
edited 2013-06-24 06:10 in Accessories
Duane Degn got me interested in some Nordic RF modules sold by SparkFun.

He is using Propeller microcontrollers in his "Panic Button" project.

These RF modules use SPI to interface with a microcontroller.

One of the SparkFun products is a key FOB with five buttons that is pre-programmed.
This is a nicely packaged key FOB that contains a Nordic nRF24L01+ radio and a ATtiny24 for control. Press any one of 5 buttons and the ATtiny24 will wake up, transmit the buttons being pressed, a 16-bit integer value of the total button presses since last battery replacement, and then return to low-power sleep.

I bought a couple of key FOBs, transceivers and antennas.

Using Duane's Propeller code, I created a BS2 program which uses the Nordic Transceiver to pick the up codes transmitted from the key FOB.

Here are links to the devices I used: key FOB , transceiver , antenna

NOTE: The pins on the transceiver unit are supposed to be 5v tolerant, but I used 10k resistors between all of the signal pins and the Basic Stamp just in case.

08789-01.jpg
00705-03-L.jpg
00558-1.jpg


The BS2 code is attached...

Here is the Debug output:
Initialized
0 val 00111011
1 val 00000000
2 val 00000011
3 val 00000011
4 val 00000000
5 val 00000010
6 val 00000110
rxAddr P0: E7 E7 E7 E7 E7
txAddr: E7 E7 E7 E7 E7
Status: 01000000
1E 01 8A 00 00
Status: 01000000
17 01 8B 00 00
Status: 01000000
1D 01 8C 00 00
Status: 01000000
1B 01 8D 00 00
Status: 01000000
0F 01 8E 00 00
 
600 x 600 - 33K
600 x 600 - 75K
600 x 600 - 45K

Comments

Sign In or Register to comment.