Adalight project i have 300  APA 102 LED Teensy 3.1 NUM_LEDS 300 .led no

Adalight project
i have 300 APA 102 LED
Teensy 3.1
#define NUM_LEDS 300 .led no response
#define NUM_LEDS .maximum 255 .leds It works fine
255 To run more LEDs What should I do

install this code

//////////
//
// Arduino interface for the use of ws2812 operated LEDs
// Uses Adalight protocol and is compatible with Boblight, Prismatik etc
// “Magic Word” for synchronisation is ‘Ada’ followed by LED High, Low and Checksum
//
//////////

#include “FastLED.h”

// Define the number of LEDs
#define NUM_LEDS 300

// Define SPI Pin
#define DATA_PIN 11
#define CLOCK_PIN 13

// Baudrate, higher rate allows faster refresh rate and more LEDs (defined in /etc/boblight.conf)
#define serialRate 115200

// Adalight sends a “Magic Word” (defined in /etc/boblight.conf) before sending the pixel data
uint8_t prefix[] = {‘A’, ‘d’, ‘a’}, hi, lo, chk, i;

// initialise LED-array
CRGB leds[NUM_LEDS];

void setup()
{

FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR>(leds, NUM_LEDS);

// initial RGB flash
LEDS.showColor(CRGB(255, 0, 0));
delay(500);
LEDS.showColor(CRGB(0, 255, 0));
delay(500);
LEDS.showColor(CRGB(0, 0, 255));
delay(500);
LEDS.showColor(CRGB(0, 0, 0));

// Serial.begin(serialRate);
Serial.print(“Ada\n”); // Send “Magic Word” string to host

}

void loop() {
// wait for first byte of Magic Word
for(i = 0; i < sizeof prefix; ++i) {
waitLoop: while (!Serial.available()) ;;
// Check next byte in Magic Word
if(prefix[i] == Serial.read()) continue;
// otherwise, start over
i = 0;
goto waitLoop;
}

// Hi, Lo, Checksum

while (!Serial.available()) ;;
hi=Serial.read();
while (!Serial.available()) ;;
lo=Serial.read();
while (!Serial.available()) ;;
chk=Serial.read();

// if checksum does not match go back to wait
if (chk != (hi ^ lo ^ 0x55))
{
i=0;
goto waitLoop;
}

memset(leds, 0, NUM_LEDS * sizeof(struct CRGB));
// read the transmission data and set LED values
for (uint8_t i = 0; i < NUM_LEDS; i++) {
byte r, g, b;
while(!Serial.available());
r = Serial.read();
while(!Serial.available());
g = Serial.read();
while(!Serial.available());
b = Serial.read();
leds[i].r = r;
leds[i].g = g;
leds[i].b = b;
}
// shows new values
FastLED.show();
}

Uint8_t is an 8 bit value and can only hold values from 0-255. Change the definition of i in your loop to int.

I do not have any information about codes
exactly where
where What is written?
sorry

Change this line:

for (uint8_t i = 0; i < NUM_LEDS; i++) {

to this:

for (int i = 0; i < NUM_LEDS; i++) {