Active carbon in soil blank II


Associated with the "Active carbon in soil, blank" protocol (see protocol for detailed description). Saves calibration value to EEPROM in slot userdef6 (1025+).
var output = {};

var blank1 = MathMEAN(json.data_raw.slice(20,80));
var blank2 = MathMEAN(json.data_raw.slice(120,180));
var blank3 = MathMEAN(json.data_raw.slice(220,280));
var blank = (blank1+blank2+blank3)/3;

// Save to userdef7 (send 1025+ to device)
output["blank"] = MathROUND(blank,4);
output["toDevice"] = "1025+"+MathROUND(blank,4)+"+0+-1+";

return output;
{
  "time_offset": 240,
  "time": 1436450459238,
  "device_id": 92,
  "firmware_version": "0.422",
  "sample": [
    [
      {
        "time": 1436450459238,
        "protocol_id": 1,
        "message": [
          [
            "confirm",
            "Insert Blank 1 of 3",
            "ok"
          ],
          [
            "confirm",
            "Reinsert blank 2 of 3",
            "ok"
          ],
          [
            "confirm",
            "Reinsert blank 3 of 3",
            "ok"
          ],
          [
            "0",
            "0",
            ""
          ]
        ],
        "data_raw": [
          65040,
          51903,
          51946,
          51981,
          51975,
          52028,
          51981,
          52011,
          52052,
          52054,
          52080,
          52089,
          52097,
          52051,
          52093,
          52058,
          52089,
          52111,
          52072,
          52137,
          52117,
          52111,
          52088,
          52116,
          52121,
          52138,
          52151,
          52137,
          52119,
          52138,
          52091,
          52155,
          52162,
          52144,
          52134,
          52161,
          52164,
          52132,
          52105,
          52148,
          52155,
          52156,
          52120,
          52095,
          52188,
          52218,
          52155,
          52173,
          52185,
          52152,
          52193,
          52161,
          52144,
          52146,
          52150,
          52167,
          52164,
          52159,
          52174,
          52198,
          52154,
          52168,
          52197,
          52134,
          52140,
          52173,
          52134,
          52185,
          52199,
          52133,
          52210,
          52170,
          52108,
          52173,
          52178,
          52194,
          52151,
          52130,
          52160,
          52141,
          52173,
          52203,
          52175,
          52209,
          52146,
          52201,
          52214,
          52189,
          52198,
          52163,
          52214,
          52196,
          52168,
          52197,
          52186,
          52217,
          52184,
          52196,
          52201,
          52123,
          65040,
          51941,
          51879,
          51951,
          51888,
          51981,
          52032,
          51935,
          52005,
          51964,
          51991,
          51995,
          51991,
          52002,
          52045,
          52030,
          52056,
          52040,
          52034,
          52062,
          52110,
          52069,
          52075,
          52073,
          52084,
          52108,
          52056,
          52091,
          52084,
          52090,
          52124,
          52099,
          52091,
          52117,
          52080,
          52094,
          52101,
          52076,
          52056,
          52096,
          52120,
          52085,
          52098,
          52091,
          52115,
          52085,
          52149,
          52157,
          52078,
          52135,
          52141,
          52128,
          52123,
          52133,
          52113,
          52115,
          52120,
          52161,
          52152,
          52129,
          52181,
          52187,
          52153,
          52118,
          52133,
          52121,
          52167,
          52136,
          52137,
          52181,
          52151,
          52133,
          52161,
          52140,
          52131,
          52158,
          52135,
          52162,
          51974,
          52115,
          52153,
          52112,
          52146,
          52153,
          52115,
          52172,
          52121,
          51983,
          52126,
          52138,
          52137,
          52145,
          52005,
          52162,
          52158,
          52153,
          52189,
          52016,
          52129,
          52181,
          65040,
          51827,
          51865,
          51900,
          51975,
          51977,
          51956,
          52006,
          52012,
          52030,
          52024,
          52023,
          52024,
          52035,
          52019,
          52051,
          52044,
          52010,
          52030,
          52192,
          52030,
          52193,
          52074,
          52049,
          52060,
          52072,
          52072,
          52038,
          52063,
          52070,
          52040,
          52015,
          52080,
          52077,
          52069,
          52034,
          52066,
          52074,
          52089,
          52070,
          52089,
          52091,
          52111,
          52091,
          52077,
          52101,
          52104,
          52063,
          52008,
          52085,
          52037,
          52072,
          52118,
          52106,
          52049,
          52088,
          52079,
          52094,
          52082,
          52141,
          52113,
          52096,
          52114,
          52126,
          52142,
          52115,
          52084,
          52089,
          52133,
          52072,
          52176,
          52115,
          52105,
          52073,
          52129,
          52107,
          52085,
          52094,
          52077,
          52110,
          52139,
          52124,
          52127,
          52131,
          52124,
          52126,
          52150,
          52066,
          52088,
          52119,
          52123,
          52047,
          52133,
          52105,
          52137,
          52140,
          52167,
          52122,
          52101,
          52123
        ],
        "macro_id": "6"
      }
    ]
  ]
}
012409 pbi 160 low low res headshot
Created by

Greg Austic


Protocol connections:
3
Latest Update:
Jul 2015