 }
 
 //------------------------------------------------------------------------------
+void EmBencode::PushChar (char ch) {
+  int len = strlen(buffer);
+  buffer[len + 1] = buffer[len];
+  buffer[len] = ch;
+}
+
+//------------------------------------------------------------------------------
+// blinks the give led pin
+//
+static void blink_led(byte pin, int delay_ms) {
+  digitalWrite(pin, HIGH);
+  delay(delay_ms);
+  digitalWrite(pin, LOW);
+}
+
+//------------------------------------------------------------------------------
 // flushes the serial port
 //
 static void serialFlush () {

#define APIN_LDR        1  // data connection for photocell
#define DPIN_ONEWIRE    3  // data connection for the Dallas OneWire bus
#define DPIN_HALL       7  // data connection for hall effect

#define MEASURE_PERIOD  100 // how often to measure, in tenths of seconds
#define RETRY_PERIOD    10  // how soon to retry if ACK didn't come in

#define REPORT_EVERY    2   // report every N measurement cycles
#define SMOOTH          3   // smoothing factor used for running averages

#define NODEID          2       // node ID used for this unit
#define NETWORKID       99
#define GATEWAYID       1
#define FREQUENCY       RF12_915MHZ

#define BUFFER_SIZE     128

// set the sync mode to 2 if the fuses are still the Arduino default
// mode 3 (full powerdown) can only be used with 258 CK startup fuses
#define RADIO_SYNC_MODE 2

enum { MEASURE, REPORT, TASK_END };

//static word schedbuf[TASK_END];
