Beginner Combine this Code for Christmas Lights Display

#include <avr/wdt.h>
#define CHANNEL_COUNT 16
#define VIXEN_COM_SPEED 9600
#define TIME_OUT 1000
#define NOT_INVERTED 0
#define INVERTED 1
#define MODE INVERTED

#define CH01 2
#define CH02 3
#define CH03 4
#define CH04 5
#define CH05 6
#define CH06 7
#define CH07 8
#define CH08 9
#define CH09 10
#define CH10 11
#define CH11 12
#define CH12 13

int channels[] = {CH01, CH02, CH03, CH04, CH05 , CH06, CH07, CH08, CH09,
CH10, CH11, CH12};

int incomingByte[CHANNEL_COUNT];

int i = 0; // Loop counter
volatile unsigned long timer_a = 0; // new line

void setup(){

// enable the watchdog timer with a time of 1 second. If the board freezes, it will reset itself after 1 second.
wdt_enable(WDTO_1S);

// specifically for the UNO
sei();

// initalize PWM Channels / Pins
for (i=0; i < CHANNEL_COUNT; i++){
pinMode(channels*, OUTPUT);*
}
if (MODE == INVERTED) {
for (i=0; i < CHANNEL_COUNT; i++){
digitalWrite(channels*, LOW);*
}
}
else {
for (i=0; i < CHANNEL_COUNT; i++){
digitalWrite(channels*, HIGH);*
}
}
testSequence();
// set up Serial according to the speed defined above.
Serial.begin(VIXEN_COM_SPEED);
}
void loop()
{
if (Serial.available() >= (CHANNEL_COUNT+2)) {
wdt_reset(); // resets the watchdog
timer_a = millis (); // new line
int uno = Serial.read();
if (uno == 126){
int dos = Serial.read();
if (dos == 33){
for (i=0; i < CHANNEL_COUNT; i++) {
// read each byte
incomingByte = Serial.read();
}
if (MODE == NOT_INVERTED) {
for (i=0; i < CHANNEL_COUNT; i++){
int value = incomingByte*;*
if (value <= 127) {
digitalWrite(channels*, LOW);*
}
else {
digitalWrite(channels*, HIGH);*
}
}
}
else {
for (i=0; i < CHANNEL_COUNT; i++){
int value = incomingByte*;*
if (value < 127) {
digitalWrite(channels*, HIGH);*
}
else {
digitalWrite(channels*, LOW);*
}
}
}
}
}
}
// Random mode code. Random mode starts if no serial input has been received in TIME_OUT millisenconds
else {
wdt_reset(); // resets the watchdog
unsigned long diff = millis() - timer_a;
if (diff >= TIME_OUT) {
timer_a = millis ();
int random_a = 0;
for (i=0; i < CHANNEL_COUNT; i++){
random_a = random(0, 2);
if (random_a == 0) {
digitalWrite(channels*, LOW);*
}
else {
digitalWrite(channels*, HIGH);*
}
}
}
}
}
void testSequence(){
if (MODE == NOT_INVERTED) {
for (i=0; i < CHANNEL_COUNT; i++){
wdt_reset(); // resets the watchdog
digitalWrite(channels*, HIGH);*
delay (500);
digitalWrite(channels*, LOW);*
}
}
else {
for (i=0; i < CHANNEL_COUNT; i++){
wdt_reset(); // resets the watchdog
digitalWrite(channels*, LOW);*
delay (500);
digitalWrite(channels*, HIGH);*
}
}
}

if ever can please change the randm mode code with this code:

/* Random blinking lights
for use on a christmas tree
By Mike Cook
*/

#define numberOfLights 12

byte pins[] = {2,3,4,5,6,7,8,9,10,11,12,13};
byte pinState[numberOfLights];
long int changeTime[numberOfLights];
int flashRate[numberOfLights];
long flashChange; // how often to change the flashing patterns

void setup() {
for(int i = 0; i< numberOfLights; i++) {
pinMode(pins*, OUTPUT);*
_ changeTime = millis() + random(100, 2000);_
_ pinState = LOW;
* }
setFlashTime();
}
void loop() {
for(int i = 0; i < numberOfLights; i++) {
if(changeTime <= millis()) {_

pinState _= ~pinState;
digitalWrite(pins, pinState);_

changeTime _= millis() + flashRate;
}
}
if(flashChange <= millis()) setFlashTime();
}
void setFlashTime(){
for(int i=0; i<numberOfLights; i++){
flashRate = random(200, 1500);
}
flashChange = millis() + 30000; // next time to change pattern*

}_