Project

General

Profile

Assigning a node ID to a JeeNode without coding it

Added by dvisor over 6 years ago

I really am a complete novice at this sort of thing, but a few days after receiving my two JeeNodes, I’ve got them talking together and reporting the temperature wirelessly. Simple stuff, I know, but I’m learning a lot. I’d like to add 3 or 4 more JeeNodes, but I’m trying to figure out a way of assigning different node IDs to each of them for the RF12 module, without having to code it into the sketch. Is there some way I can use jumpers on the board to assign a node ID? I’ve done quite a bit of searching, but maybe I’m using the wrong terminology.


Replies (3)

Assigning a node ID to a JeeNode without coding it - Added by martynj over 6 years ago

dvisor,

There is space in the EEPROM to store a per device ID - if you look through RF12Demo, there is similar storage/retrieval of initial parameters for the radio module.

At first glance, there is not a direct way to jumper an ID for several nodes - it consumes too many I/O pins to link them either HIGH or LO and create say a 4 bit I.D.
You could use an ADC trick for this - it would only use up one AIO pin connected at the center of a voltage divider from Vcc to GND.  Set the ADC to compare against Vcc and program the I.D. as the resistor ratio - the number of I.D. bits available will just depend on the resistor tolerances. 

Might be a good excuse to investigate the ADC world ;-)

RE: Assigning a node ID to a JeeNode without coding it - Added by JohnO over 6 years ago

There is an experimental version of RF12Demo which can allocate node numbers via the radio link. It depends on your node topology, the experimental version assumes a star network with RF12Demo at the centre. https://github.com/jcw/jeelib/tree/RF12Demo

RE: Assigning a node ID to a JeeNode without coding it - Added by JohnO over 6 years ago

The simpler answer to your question:

> I’m trying to figure out a way of assigning different node IDs to each of them for the RF12 module, without having to code it into the sketch.

Is to use any version of RF12Demo to initialise the eeprom contents and then load your custom sketch which must then use a call to rf12_config() within your sketch to set up the radio using the eeprom contents to configure the radio details.

    (1-3/3)