 bool check_radio(void){
   if (radio.available()){
     timeout = millis() + 10000;
-    if (msg[1] == 0 || msg[1] == addr){
+    if (MSG_ADDR == 0 || MSG_ADDR == addr){
       return true;
     }
     // for safety reset msg target to a value that matches no lantern
-    msg[1] = 255;
+    MSG_ADDR = 255;
     return false;
   }
 }
 
 bool process_msg(void){
   radio.read(msg, 32);
-  byte cmnd = msg[2];
+  byte cmnd = MSG_CMD;
   switch (cmnd){
     case 'P':    // set pattern number
-      if (msg[3] != pattern){  // new pattern
-        pattern = msg[3];
+      if (MSG_MOD1 != pattern){  // new pattern
+        pattern = MSG_MOD1;
         return true;
       }
       else{

#include <Adafruit_NeoPixel.h>
#include <avr/power.h>
//#include "printf.h"

#define PIN 6


      }
      break;
    case 'S':    // set speed of the pattern
      rate = MSG_MOD1;
      return false;
      break;
    default:
