updated code to control 6 groups of LED