Hi,
What exactly happens, when you say "instruction not works"? Does your code compile but the screen brightness doesn't change?
Have you tested other AXP function like the Battery status:
char text_buffer[32];
M5.Lcd.fillScreen(TFT_BLACK);
M5.Lcd.drawCentreString("Battery status:", 80, 20, 2);
snprintf(text_buffer, sizeof(text_buffer), "%.2fV --- %.2fmA", M5.Axp.GetBatVoltage(), M5.Axp.GetBatCurrent());
M5.Lcd.drawCentreString(text_buffer, 80, 40, 2);
Is that working?