rf demo settings

funky v3 w/rfm69

funky v3 w/rfm69

Martin has been creating awesome little funkys based off of the jeenode boards. I picked up a couple v3’s with the newish rfm69 chips to try out their improved range and power consumption. After getting some help from Matt, we were able to have them talking to each other. Sensor A ran a version of the TimedSend example sketch while sensor B ran the rf12demo sketch found on Martin’s website.

Sensor A configuration: nodeId: 1, band: 433Mhz, group: 212
Sensor B configuration: nodeId: 17, band: 433Mhz, group: 212

To configure sensor B, we typed into the serial monitor: 4b 212g 17i

Available commands w/demo sketch:
i – set node ID (standard node ids are 1..30)
b – set MHz band (4 = 433, 8 = 868, 9 = 915)
o – change frequency offset within the band (default 1600) 96..3903 is the range supported by the RFM12B
g – set network group (RFM12 only allows 212, 0 = any)
c – set collect mode (advanced, normally 0)
t – broadcast max-size test packet, request ack
…, a – send data packet to node , request ack
…, s – send data packet to node , no ack
q – set quiet mode (1 = don’t report bad packets)
x – set reporting format (0: decimal, 1: hex, 2: hex+ascii)
123 z – total power down, needs a reset to start up again

Remote control commands:
,,, f – FS20 command (868 MHz)
,, k – KAKU command (433 MHz)

http://jeelabs.net/projects/jeelib/wiki/RF12demo

Sensor A

/// @dir timedSend
/// Experiment with time-controlled periodic transmission.
// 2011-06-24 <jc@wippler.nl> http://opensource.org/licenses/mit-license.php

#define RF69_COMPAT 1 // define this to use the RF69 driver i.s.o. RF12

#include <JeeLib.h>

MilliTimer sendTimer;
byte pending;
word seqnum;

void setup () {
  Serial.begin(57600);
  Serial.println("\n[timedSend]");
  rf12_initialize(25, RF12_433MHZ, 210);
}

void loop () {
  if (rf12_recvDone() && rf12_crc == 0 && rf12_len == 2) { // we're not asking for ack back, so this will always be false.
    sendTimer.set(0);
    Serial.print(" #");
    Serial.print(seqnum);
    Serial.print(" start: ");
    Serial.print(rf12_data[0], DEC);
    Serial.print(" recvd: ");
    Serial.println(rf12_data[1], DEC);
  }
  
  if (sendTimer.poll(2096))
    pending = 1;
  
  if (pending && rf12_canSend()) {
    pending = 0;
    rf12_sendStart(0, "hello!", 6); // '0' are not asking for for an ack back
    ++seqnum;
  }
}

Martin’s low power lab sketches

https://harizanov.com/2015/04/funky-v3-with-rfm69cw-using-lowpowerlabs-rf69-library/

Low Power Lab
https://github.com/LowPowerLab/RFM69
https://github.com/lowpowerlab/lowpower

Send
https://github.com/mharizanov/new_Funky/blob/master/examples/LowPowerLab_RF69_lib_test/Struct_send/Struct_send.ino

Receive
https://github.com/mharizanov/new_Funky/blob/master/examples/LowPowerLab_RF69_lib_test/Struct_receive/Struct_receive.ino

You may also like...