Posts Tagged ‘Software’

Small Update to Mirf Library

Posted in Arduino, News on July 13th, 2010 by nisburgh – Be the first to comment

One of my readers asked ( in the forums too ) for some help on reading register values from the Nordic chip, so I put together a quick example and added it to the library. This example reads the RF_SETUP register and prints the value in binary to the Serial output:

/**
 * Pins:
 * Hardware SPI:
 * MISO -> 12
 * MOSI -> 11
 * SCK -> 13
 *
 * Configurable:
 * CE -> 8
 * CSN -> 7
 */

#include 
#include 
#include 

void setup() {
  Serial.begin(9600);
  Serial.println( "Starting wireless..." );

  // Setup
  Mirf.init();
  Mirf.setRADDR((byte *)"clie1");
  Mirf.payload = sizeof(unsigned long);
  Mirf.config();

  // Read and print RF_SETUP
  byte rf_setup = 0;
  Mirf.readRegister( RF_SETUP, &rf_setup, sizeof(rf_setup) );
  Serial.print( "rf_setup = " );
  Serial.println( rf_setup, BIN );

  Serial.println( "Wireless initialized!" );
}

void loop() {}

When I ran this code on my board, it printed:

Starting wireless...
rf_setup = 1111
Wireless initialized!

So that’s 00001111 for the value of RF_SETUP. Breaking it down, high bit to low bit, using the datasheet:

0 – No continuous carrier wave
0 – Reserved – must be 0
0 – RF_DR_LOW is 0
0 – No PLL lock signal
1 – RF_DR_HIGH is 1, and according to chart, 01 = 2 Mbps
1 – High bit RF_PWR is 1
1 – Low bit RF_PWR is 1, according to chart, 11 = 0 dBm output power
1 – Not used/obsolete

You can download the library and bundled examples ( including this one ) from the Software page. Cheers!

Git: A cause for changing your SCM tool

Posted in Software on April 18th, 2010 by nisburgh – Be the first to comment

I’m generally one of those people that doesn’t feel the need to fix something that ain’t broke.  So when all of this hooplah about Git hit the programming scene a while ago, I didn’t feel obligated to jump on board.  I had been using Subversion quite happily for years, and CVS before that.  SVN did what I needed, and worked well for me since I ran a remote, secured repository which I backed up hourly.

A friend recommended I look into Git, and I did.  I looked at the website, read the tutorial, and simply could not figure out why I should switch my Source Code Management system.  It felt like change for the sake of change, and I am not a fan of that idea.

Enter: Hg Init – The Mercurial Tutorial.  Here was a very well written tutorial and explanation as to why you should make the move to Mercurial ( which is very similar to Git ).  Give it a read, you’ll see what I mean.  I know I’ll be switching soon.

More software! This time some fixes to the Mirf library

Posted in Arduino on November 12th, 2009 by nisburgh – 16 Comments

I’ve added another Arduino library to the software page. This one is an updated version of the original Mirf library, used for interfacing with the Nordic Semiconductor RF modules, like the nRF24L01+. I fixed a bug, updated the code here and there, fixed one of the examples and made some other small changes. As I work further with the library, I’ll push changes up here if they’re big. The bug fix was a pretty big one, so I wanted to share it with everyone. Let me know if you have any comments or suggestions!

Software!

Posted in Website on November 9th, 2009 by nisburgh – Be the first to comment

I’ve added a new page to the site! Software! I’ll try to clean up my more useful bits of code and put them up there, free for anyone to use and abuse. I’m always happy to get feedback, so don’t hesitate to let me know just how terrible the code is. ;)

The first bit unleashed on the world is a simple library for controlling status LED’s in your Arduino projects.  Enjoy!