     Wire.write(0x2A);
     rcw = Wire.endTransmission();
     if (rcw) {
-        snprintf(global_printbuf, printbufSize, "! CO2 COMMS error2 - RC = %d", rcw);
-        Particle.publish(DataSource, global_printbuf, 60, PRIVATE);
+        snprintf(g_printbuf, g_printbuf_sz, "! CO2 COMMS error2 - RC = %d", rcw);
+        Particle.publish(DataSource, g_printbuf, 60, PRIVATE);
         co2errors++;
         rcw = Wire.endTransmission();
         rcw = Wire.endTransmission();

    rcw = Wire.endTransmission();
    rcw = 0;
    if (rcw) {
        snprintf(global_printbuf, printbufSize, "! CO2 COMMS error1 - RC = %d", rcw);
        Particle.publish(DataSource, global_printbuf, 60, PRIVATE);
        co2errors++;
        Wire.end();
        delay(500);

    Wire.setSpeed(i2cDataRate);
    Wire.begin();
    delay(500);
    const int outbuf_9dof_sz = 128;
    char outbuf_tester[outbuf_9dof_sz];
    disable9DOFSensor(outbuf_tester, outbuf_9dof_sz);
    Particle.publish(DataSource, outbuf_tester, 60, PRIVATE);
    delay(2000);
}
