     
     // Set level (0 to num leds), counting outwards from the GrovePi, 0 = all off, 1 = first led, reversible to count inwards
     // [95, pin, level, reverse]
-    else if(cmd[0] == 95)
+    else if(cmd[0] == CMD_CLED_SET_lEVEL)
     {
       // get the chain length
       byte num_leds = rgbled[cmd[1]-2].getNumLeds();

    // Toggle a single led
    // led (1-10)
    // [54, pin, led, unused]
    else if(cmd[0] == 54 && ledbar[cmd[1]-2].ready())
    {
      ledbar[cmd[1]-2].toggleLed(cmd[2]);
    }

    //                       |        |
    //                       10       1
    // [55, pin, bits 1-8, bits 9-10]
    else if(cmd[0] == CMD_LED_BAR_SET_STATE && ledbar[cmd[1]-2].ready())
    {
      ledbar[cmd[1]-2].setBits(cmd[2] ^ (cmd[3] << 8));
    }

    // Return the current state
    // [56, pin, unused, unused]
    else if(cmd[0] == CMD_LED_BAR_RET_STATE && ledbar[cmd[1]-2].ready())
    {
      unsigned int state = ledbar[cmd[1]-2].getBits();
      b[1] = state & 0xFF;
